* Further improvements to generate Packing List

This commit is contained in:
2025-05-16 21:48:43 +02:00
parent da1eae8ca9
commit 55f7ed76fd
25 changed files with 474 additions and 198 deletions

View File

@@ -0,0 +1,29 @@
using Microsoft.AspNetCore.Mvc;
using SytelineSaAppEfDataModel.Dtos;
using SytelineSaAppEfDataModel.Services;
namespace FaKrosnoApi.Controllers;
[ApiController]
[Route("api/[controller]")]
public class WzRowMeyleController(IWzRowMeyleService service) : Controller
{
[HttpGet]
public async Task<ActionResult<IEnumerable<WzRowMeyleDto>>> GetAll()
{
IEnumerable<WzRowMeyleDto> wzRows = await service.GetAll();
return Ok(wzRows);
}
[HttpPost]
public async Task<ActionResult> CreateRows([FromBody] IEnumerable<WzRowMeyleDto> rows)
{
if (rows == null || !rows.Any())
{
return BadRequest("No rows provided.");
}
await service.CreateRows(rows);
return CreatedAtAction(nameof(GetAll), new { count = rows.Count() }, rows);
}
}