Files
FA_WEB/FaKrosnoApi/Controllers/CustomerController.cs
Piotr Kus 6139ce97d7 * Added new Entities and Dtos
* Mapping new classes
* Added new services and Controllers in API
2025-08-07 06:46:43 +02:00

17 lines
473 B
C#

using Microsoft.AspNetCore.Mvc;
using SytelineSaAppEfDataModel.Dtos;
using SytelineSaAppEfDataModel.Services;
namespace FaKrosnoApi.Controllers;
[ApiController]
[Route("api/[controller]")]
public class CustomerController(ICustomerService service) : Controller
{
[HttpGet]
public async Task<ActionResult<IEnumerable<CustomerDto>>> GetAllCustomers()
{
IList<CustomerDto> customers = await service.GetAllCustomers();
return Ok(customers);
}
}