testade calibre

This commit is contained in:
2025-09-05 17:23:24 +02:00
parent ecd0d5a3d2
commit ec787e80e4
8 changed files with 886 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
using Bibblan.Business.Services;
using Bibblan.Models;
using Microsoft.AspNetCore.Mvc;
namespace Bibblan.Controllers
{
[ApiController]
[Route("api/[controller]")]
public class CalibreController : ControllerBase
{
CalibreService service;
public CalibreController(CalibreContext db) {
service = new CalibreService(db);
}
[HttpGet("books")]
public IActionResult GetBooks()
{
var books = service.GetAllBooks().Take(100).ToList();
return Ok(books);
}
}
}