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)); } }
public DesenvolvedorXLancamentohorasController(IDesenvolvedorXLancamentohorasService service) { _servicodesenvolvedorxlancamentohoras = service; }