public bool Delete(int id) { var user = _context.Users.FirstOrDefault(user => user.Id == id); if (user == null) { return(false); } _context.Remove(user); _context.SaveChanges(); return(true); }
public bool Delete(int id) { var School = _context.Schools.FirstOrDefault(School => School.Id == id); if (School == null) { return(false); } _context.Remove(School); _context.SaveChanges(); return(true); }