コード例 #1
0
        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)));
        }
コード例 #2
0
        public async Task <IActionResult> DeleteConfirmed(long?id)
        {
            var instituicao = await instituicaoDAL.EliminarInstituicaoPorId((long)id);

            await _context.SaveChangesAsync();

            return(RedirectToAction(nameof(Index)));
        }
コード例 #3
0
        public async Task <IActionResult> Delete(Instituicao instituicao)
        {
            await instituicaoDAL.EliminarInstituicaoPorId((long)instituicao.InstituicaoID);

            return(RedirectToAction(nameof(Index)));
        }
コード例 #4
0
        public async Task <IActionResult> DeleteConfirmed(long?id)
        {
            await instituicaoDAL.EliminarInstituicaoPorId((long)id);

            return(RedirectToAction(nameof(Index)));
        }