Beispiel #1
0
        public void Delete()
        {
            MYSQL_University university = new MYSQL_University();
            Department       willBeDeletedDepartment = university.Department.FirstOrDefault(x => x.DepartmentID == 1);

            university.Department.Delete(willBeDeletedDepartment);
            university.PushToDB();
        }
Beispiel #2
0
        public void Update()
        {
            MYSQL_University university = new MYSQL_University();
            Department       willBeUpdatingDepartment = university.Department.FirstOrDefault(x => x.DepartmentID == 1);

            willBeUpdatingDepartment.DepartmentName = "Computer Engineering Updated";
            university.Department.Update(willBeUpdatingDepartment);
            university.PushToDB();
        }
Beispiel #3
0
        public void Insert()
        {
            MYSQL_University university = new MYSQL_University();

            university.Department.Insert(new Department {
                DepartmentID = 1, DepartmentName = "Computer Engineering"
            });
            university.PushToDB();
        }