public async Task <IActionResult> DeleteConfirmed(long?id) { var instituicao = await instituicaoDAL.EliminarInstituicaoPorId((long)id); TempData["Message"] = "Instituição " + instituicao.Nome.ToUpper() + " foi removida"; return(RedirectToAction(nameof(Index))); }
public async Task <IActionResult> DeleteConfirmed(long?id) { var instituicao = await instituicaoDAL.EliminarInstituicaoPorId((long)id); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); }
public async Task <IActionResult> Delete(Instituicao instituicao) { await instituicaoDAL.EliminarInstituicaoPorId((long)instituicao.InstituicaoID); return(RedirectToAction(nameof(Index))); }
public async Task <IActionResult> DeleteConfirmed(long?id) { await instituicaoDAL.EliminarInstituicaoPorId((long)id); return(RedirectToAction(nameof(Index))); }