Esempio n. 1
0
        public void Delete(int departmentID)
        {
            var selectedDepartment = _dbContext.Departments.FirstOrDefault(x => x.ID == departmentID);

            _dbContext.Departments.Remove(selectedDepartment);
            _dbContext.SaveChanges();
        }
Esempio n. 2
0
        public void Delete(int schoolID)
        {
            var selectedSchool = _dbContext.Schools.FirstOrDefault(x => x.ID == schoolID);

            _dbContext.Schools.Remove(selectedSchool);
            _dbContext.SaveChanges();
        }
Esempio n. 3
0
        public void Delete(int studentID)
        {
            var selectedStudent = _dbContext.Students.FirstOrDefault(x => x.ID == studentID);

            _dbContext.Students.Remove(selectedStudent);
            _dbContext.SaveChanges();
        }