public void DeleteClass(int ID) { var ClassToDelete = _qLSVDbContext.Classes.Find(ID); _qLSVDbContext.Remove(ClassToDelete); _qLSVDbContext.SaveChanges(); }
public void DeleteSchool(int ID) { var Result = _qLSVDbContext.Schools.Where(x => x.ID == ID).FirstOrDefault(); if (Result != null) { _qLSVDbContext.Remove(Result); _qLSVDbContext.SaveChanges(); } }