Exemplo n.º 1
0
 public async Task <ActionResult> GetFiveTop([FromServices] IDesenvolvedorXLancamentohorasService service)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState)); //Solicitacao Indevida 400
     }
     try
     {
         return(Ok(await service.GetFiveTop()));
     }
     catch (ArgumentException ex) //200 Sucesso
     {
         return(StatusCode((int)HttpStatusCode.InternalServerError, ex.Message));
     }
 }
Exemplo n.º 2
0
 public DesenvolvedorXLancamentohorasController(IDesenvolvedorXLancamentohorasService service)
 {
     _servicodesenvolvedorxlancamentohoras = service;
 }