public async Task <ActionResult <Model.Receita> > GetByIdAsync(int id) { try { var receita = await _service.GetByIdAsync(id); if (receita != null) { return(new OkObjectResult(receita)); } return(new NotFoundResult()); } catch (Exception ex) { return(new BadRequestObjectResult(ex)); } }