public IActionResult Delete(int id) { var category = _context.Categories.Find(id); _context.Remove(category); _context.SaveChanges(); return(RedirectToAction(nameof(Index))); }
public IActionResult Delete(int id) { var member = _context.Members.Find(id); if (member == null) { return(NotFound()); } _context.Remove(member); _context.SaveChanges(); return(RedirectToAction(nameof(Index))); }