* Added new Entities and Dtos
* Mapping new classes * Added new services and Controllers in API
This commit is contained in:
17
FaKrosnoApi/Controllers/CustomerController.cs
Normal file
17
FaKrosnoApi/Controllers/CustomerController.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user