Files
FA_WEB/FaKrosnoApi/Controllers/EdiCustomerOrdersTranslationsController.cs

24 lines
728 B
C#

using Microsoft.AspNetCore.Mvc;
using SytelineSaAppEfDataModel.Dtos;
using SytelineSaAppEfDataModel.Services;
namespace FaKrosnoApi.Controllers;
[ApiController]
[Route("api/[controller]")]
public class EdiCustomerOrdersTranslationsController(IEdiCustomerOrderTranslateService service) : Controller
{
[HttpGet]
public async Task<ActionResult<IEnumerable<EdiCustomerOrderTranslateDto>>> GetAll()
{
IEnumerable<EdiCustomerOrderTranslateDto?> ediCustomerOrdersTranlations = await service.GetAll();
return Ok(ediCustomerOrdersTranlations);
}
[HttpDelete]
public async Task<IActionResult> Delete([FromQuery] int id)
{
await service.Delete(id);
return NoContent();
}
}