using AutoMapper; using SytelineSaAppEfDataModel.Dtos; namespace SytelineSaAppEfDataModel.Services; public class VatCodeAssociationService(SytelineSaAppDbContext context, IMapper mapper) : IVatCodeAssociationService { public async Task GetVatCodesAssociation(string customerDoInvoice, string endUserType, string productCode) { return await Task.FromResult(mapper.Map(context.VatCodeAssociations.FirstOrDefault(x => x.VATRegisterType == customerDoInvoice && x.EndUserType == endUserType && x.ProdCode == productCode))); } }