Пример #1
0
 public void AddDepartment(Department department)
 {
     _organizationRepository.AddDepartment(department);
 }
 public void AddDepartment(Department department)
 {
     using (var uow = new UnitOfWork())
     {
         uow.GetRepository<Department>().Items.SelectMany(x => x.DepartmentInOrganizations).Each(s => uow.GetRepository<DepartmentInOrganization>().Items.ToList().Add(s));
         uow.GetRepository<Department>().Insert(department);
         uow.SaveChanges();
     }
 }
 public void AddDepartment(Department department)
 {
     _organizationBl.AddDepartment(department);
 }