public void DeleteStudent(int id) { var data = schoolDBContext.Students.SingleOrDefault(a => a.Id == id); schoolDBContext.Remove(data); schoolDBContext.SaveChanges(); }