public IActionResult Delete(Person person)
 {
     _context.Remove(person);
     _context.SaveChanges();
     return(RedirectToAction("Index"));
 }
示例#2
0
 public bool DeletePerson(Person person)
 {
     _context.Remove(person);
     _context.SaveChanges();
     return(true);
 }