예제 #1
0
 public IActionResult GetAll([FromServices] IClienteApplicationService clienteApplicationService)
 {
     try
     {
         return(Ok(clienteApplicationService.GetAll()));
     }
     catch (Exception e)
     {
         return(StatusCode(500, e.Message));
     }
 }
예제 #2
0
        public ActionResult <IEnumerable <string> > Get()
        {
            try
            {
                var results = _clienteApplicationService.GetAll();

                return(Ok(results));
            }
            catch (Exception ex)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, $"Banco Dados Falhou {ex.Message}"));
            }
        }
예제 #3
0
        public IActionResult GetAll()
        {
            try
            {
                var result = clienteApplicationService.GetAll();

                return(Ok(result));
            }
            catch (Exception e)
            {
                new Exception("Erro ao selecionar o Aluno", e);
                return(this.BadRequest());
            }
        }
예제 #4
0
        public IActionResult GetAll()
        {
            try
            {
                var result = _clienteApplicationService.GetAll();

                if (result == null || result.Count == 0)
                {
                    return(StatusCode(204));
                }

                return(StatusCode(200, result));
            }
            catch (Exception e)
            {
                return(StatusCode(500, new { e.Message }));
            }
        }
 public ActionResult <IEnumerable <string> > Get()
 {
     return(Ok(_clienteApp.GetAll()));
 }
예제 #6
0
        public IEnumerable <ClienteDto> GetAll()

        {
            return(_clienteApplicationSerice.GetAll());
        }