Beispiel #1
0
        public async Task <IActionResult> GetByAgenciaAndConta(int conta, int agencia)
        {
            try
            {
                var contaByAgenciaAndConta = await _service.GetByContaAndAgencia(conta, agencia);

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