Esempio n. 1
0
        public async Task <IActionResult> AplicarPoupanca(HelperContaDto contaResgatar)
        {
            try
            {
                var conta = await _service.AplicarPoupanca(contaResgatar);

                return(Ok(conta));
            }
            catch (NotFoundException e)
            {
                return(this.StatusCode(StatusCodes.Status404NotFound, $"{e.Message}"));
            }
            catch (ArgumentException e)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, $"{e.Message}"));
            }
        }