public static DepartmentVM GetDepartmentVM(int id) { if (!AllDepartmentVMs.ContainsKey(id)) { Department model = AllEntities.Departments.Single(x => x.Id == id); Organization.AddDepartment(new DepartmentVM(model)); } return(AllDepartmentVMs[id]); }
private static void ClearAllData() { Organization.Employees.Clear(); Organization.Departments.Clear(); AllEntities.Employees.Clear(); AllEntities.Departments.Clear(); AllDepartmentVMs.Clear(); AllEmployeeVMs.Clear(); }