* Added ItemCustPriceAll entity
This commit is contained in:
23
FaKrosnoApi/Controllers/ItemCustPriceAllController.cs
Normal file
23
FaKrosnoApi/Controllers/ItemCustPriceAllController.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
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));
|
||||
}
|
||||
}
|
||||
@@ -107,6 +107,7 @@ builder.Services.AddScoped<ICustomerService, CustomerService>();
|
||||
builder.Services.AddScoped<ICustomerTpService, CustomerTpService>();
|
||||
builder.Services.AddScoped<IItemService, ItemService>();
|
||||
builder.Services.AddScoped<IVatCodeAssociationService, VatCodeAssociationService>();
|
||||
builder.Services.AddScoped<IItemCustPriceAllService, ItemCustPriceAllService>();
|
||||
|
||||
builder.Services.AddHostedService<TimedHostedService>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user