示例#1
0
        public virtual async Task <OrganizationUnitDto> CreateAsync(OrganizationUnitCreateDto input)
        {
            var origanizationUnit = new OrganizationUnit(
                GuidGenerator.Create(), input.DisplayName, input.ParentId, CurrentTenant.Id)
            {
                CreationTime = Clock.Now
            };

            input.MapExtraPropertiesTo(origanizationUnit);

            await OrganizationUnitManager.CreateAsync(origanizationUnit);

            await CurrentUnitOfWork.SaveChangesAsync();

            return(ObjectMapper.Map <OrganizationUnit, OrganizationUnitDto>(origanizationUnit));
        }
示例#2
0
 public virtual async Task <OrganizationUnitDto> CreateAsync(OrganizationUnitCreateDto input)
 {
     return(await OrganizationUnitAppService.CreateAsync(input));
 }