示例#1
0
        public virtual async Task CreateAsync(OrganizationUnit organizationUnit)
        {
            organizationUnit.Code = await GetNextChildCodeAsync(organizationUnit.ParentId);
            await ValidateOrganizationUnitAsync(organizationUnit);

            await OrganizationUnitRepository.InsertAsync(organizationUnit);
        }
示例#2
0
        public virtual async Task CreateAsync(OrganizationUnit organizationUnit)
        {
            using (var uow = UnitOfWorkManager.Begin())
            {
                organizationUnit.Code = await GetNextChildCodeAsync(organizationUnit.ParentId);
                await ValidateOrganizationUnitAsync(organizationUnit);

                await OrganizationUnitRepository.InsertAsync(organizationUnit);

                await uow.CompleteAsync();
            }
        }