Init commit

This commit is contained in:
2023-10-16 20:48:58 +02:00
parent 5ebc16046c
commit 2d5dfd6154
14 changed files with 286 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using GerbilManager.Models;
using GerbilManager.Repositories;
using Microsoft.AspNetCore.Mvc;
namespace GerbilManager.Controllers
{
[ApiController]
[Route("gerbils")]
public class GerbilsController : ControllerBase
{
private readonly InMemGerbilRepository repository;
public GerbilsController()
{
repository = new InMemGerbilRepository();
}
//GET /gerbils
[HttpGet]
public IEnumerable<Gerbil> GetGerbils()
{
var items = repository.GetGerbils();
return items;
}
}
}