public void DeleteEmployees(IEnumerable <EmployeeModel> employees) { var empIds = new List <int>(); foreach (var emp in employees) { empIds.Add(emp.Id); } _employessRepository.DeleteEmployees(empIds); foreach (var emp in employees) { _employess.Remove(emp); } }
public void DeleteDepartment(DepartmentModel department) { _departmentsRepository.DeleteDepartment(department.Id); _departments.Remove(department); }