Beispiel #1
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            var instituicao = _context.GetEntityById(id);
            await _context.Delete(instituicao);

            return(RedirectToAction(nameof(Index)));
        }
Beispiel #2
0
        public async Task <ActionResult <Instituicao> > DeleteInstituicao(int id)
        {
            var instituicao = _context.GetEntityById(id);

            if (instituicao == null)
            {
                return(NotFound());
            }

            await _context.Delete(instituicao);

            return(instituicao);
        }