Esempio n. 1
0
        public async Task <CalculoTaxaJurosDto> Handle(CalcularTaxaJurosCommand request, CancellationToken cancellationToken)
        {
            decimal taxaAtual = await _taxaJurosService.GetTaxaJurosAtual(cancellationToken);

            var taxaJuros = new CalculoTaxaJuros(request.ValorInicial, request.TempoMeses, taxaAtual);

            return(new CalculoTaxaJurosDto(taxaJuros.GetResultadoFormatted(2, CultureInfo.CurrentUICulture)));
        }