public IActionResult GetTaxaJuros()
        {
            TaxaJuros objTaxaJuros = iTaxaJurosService.GetTaxaJuros();

            if (objTaxaJuros == null)
            {
                return(BadRequest("Nenhuma taxa de juros cadastrado!"));
            }

            return(Ok(objTaxaJuros.ValorTaxa));
        }
Esempio n. 2
0
 public ActionResult <IEnumerable <decimal> > Get()
 {
     try
     {
         var taxa = new TaxaJuros()
         {
             Valor = 0.01m
         };
         return(StatusCode(200, taxa.Valor));
     }
     catch (Exception erro)
     {
         return(StatusCode(500, string.Format("Erro ao buscar a taxa: {0}", erro.Message)));
     }
 }