* Extended of Dtos
* Added new Services and Controllers
This commit is contained in:
19
FaKrosnoApi/Controllers/EdiLogController.cs
Normal file
19
FaKrosnoApi/Controllers/EdiLogController.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SytelineSaAppEfDataModel.Dtos;
|
||||
using SytelineSaAppEfDataModel.Services;
|
||||
|
||||
namespace FaKrosnoApi.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class EdiLogController(IEdiLogService service) : Controller
|
||||
{
|
||||
[HttpPost]
|
||||
public async Task<ActionResult> Add([FromBody] EdiLogDto ediLog)
|
||||
{
|
||||
var result = await service.AddEdiLog(ediLog);
|
||||
return result
|
||||
? Ok("Utworzono rekord w tabeli EdiLog.")
|
||||
: BadRequest($"Nie mogę utworzyć rekordu w tabeli EdiLog.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user