예제 #1
0
        public IActionResult Delete(string Id)
        {
            var curso = (from cur in _context.Cursos
                         where cur.Id == Id
                         select cur).FirstOrDefault();

            if (curso != null)
            {
                _context.Remove(curso);
                _context.SaveChanges();
            }

            return(View("MultiCurso", _context.Cursos));
        }