public async Task <IActionResult> DeleteConfirmed(int id) { var instituicao = _context.GetEntityById(id); await _context.Delete(instituicao); return(RedirectToAction(nameof(Index))); }
public async Task <ActionResult <Instituicao> > DeleteInstituicao(int id) { var instituicao = _context.GetEntityById(id); if (instituicao == null) { return(NotFound()); } await _context.Delete(instituicao); return(instituicao); }