Ejemplo n.º 1
0
 public async Task <decimal> GetPricing(GetPricingRequestDto request)
 {
     return(await context.Prices
            .Where(p =>
                   request.ProductCodes.Any(x => x == p.Tarrif.ProductCode) &&
                   p.AgeFrom <= request.InsuredAge && p.AgeTo >= request.InsuredAge)
            .SumAsync(x => x.Rate));
 }
Ejemplo n.º 2
0
 public async Task <decimal> Get([FromQuery] GetPricingRequestDto request)
 {
     return(await pricingService.GetPricing(request));
 }