23 lines
708 B
C#
23 lines
708 B
C#
using AutoMapper;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using SytelineSaAppEfDataModel.Dtos;
|
|
using SytelineSaAppEfDataModel.Services;
|
|
|
|
namespace FaKrosnoApi.Controllers;
|
|
|
|
[ApiController]
|
|
[Route("api/[controller]")]
|
|
public class ItemCustPriceAllController(IItemCustPriceAllService service, IMapper mapper) : Controller
|
|
{
|
|
[HttpGet("by-parameters")]
|
|
public async Task<ActionResult<ItemCustPriceAllDto>> GetItemCustPriceAll(string itemCode, string customerDoInvoice)
|
|
{
|
|
var result = await service.GetItemCustPriceAllAsync(itemCode, customerDoInvoice);
|
|
if (result == null)
|
|
{
|
|
return NotFound();
|
|
}
|
|
|
|
return Ok(mapper.Map<ItemCustPriceAllDto>(result));
|
|
}
|
|
} |