コード例 #1
0
        public async Task <double> GetTaxes(GetCalculatedTaxesDTO request)
        {
            var municipality = await _municipalityRepository.GetById(request.MunicipalityId);

            if (municipality == null)
            {
                _logger.LogError($"Municipality with id {request.MunicipalityId} not found");
                throw new Exception("Municipality not found");
            }

            var result = _taxesCalculationService.CalculateTaxes(municipality.RuleKey, request.Date);

            return(result);
        }
コード例 #2
0
 public async Task <double> GetTaxes([FromQuery] GetCalculatedTaxesDTO query)
 {
     return(await _taxesService.GetTaxes(query));
 }