public void Delete() { MYSQL_University university = new MYSQL_University(); Department willBeDeletedDepartment = university.Department.FirstOrDefault(x => x.DepartmentID == 1); university.Department.Delete(willBeDeletedDepartment); university.PushToDB(); }
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(); }
public void Insert() { MYSQL_University university = new MYSQL_University(); university.Department.Insert(new Department { DepartmentID = 1, DepartmentName = "Computer Engineering" }); university.PushToDB(); }