Exemple #1
0
        public virtual void Delete(long id)
        {
            var children = FindChildren(id, true);

            foreach (var child in children)
            {
                OrganizationUnitRepository.Delete(child);
            }

            OrganizationUnitRepository.Delete(id);
        }
Exemple #2
0
        public virtual void Delete(long id)
        {
            using (var uow = UnitOfWorkManager.Begin())
            {
                var children = FindChildren(id, true);

                foreach (var child in children)
                {
                    OrganizationUnitRepository.Delete(child);
                }

                OrganizationUnitRepository.Delete(id);

                uow.Complete();
            }
        }