Example #1
0
        public void DeleteClass(int ID)
        {
            var ClassToDelete = _qLSVDbContext.Classes.Find(ID);

            _qLSVDbContext.Remove(ClassToDelete);
            _qLSVDbContext.SaveChanges();
        }
Example #2
0
        public void DeleteSchool(int ID)
        {
            var Result = _qLSVDbContext.Schools.Where(x => x.ID == ID).FirstOrDefault();

            if (Result != null)
            {
                _qLSVDbContext.Remove(Result);
                _qLSVDbContext.SaveChanges();
            }
        }