public async Task <ActionResult <Instituicao> > GetInstituicao(int id) { var instituicao = _context.GetEntityById(id); if (instituicao == null) { return(NotFound()); } return(instituicao); }
// GET: Instituicoes/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var instituicao = _context.GetEntityById((int)id); // .FirstOrDefaultAsync(m => m.Id == id); //if (instituicao == null) //{ // return NotFound(); //} return(View(instituicao)); }