Files
FA_WEB/SytelineSaAppEfDataModel/Services/CustomerTpService.cs
Piotr Kus 6139ce97d7 * Added new Entities and Dtos
* Mapping new classes
* Added new services and Controllers in API
2025-08-07 06:46:43 +02:00

13 lines
416 B
C#

using AutoMapper;
using Microsoft.EntityFrameworkCore;
using SytelineSaAppEfDataModel.Dtos;
namespace SytelineSaAppEfDataModel.Services;
public class CustomerTpService(SytelineSaAppDbContext context, IMapper mapper) : ICustomerTpService
{
public async Task<IList<CustomerTpDto>> GetAllCustomersTp()
{
return await context.CustomerTps.Select(x => mapper.Map<CustomerTpDto>(x)).ToListAsync();
}
}