public virtual async Task <ApiScopeDto> CreateAsync(ApiScopeCreateDto input) { if (await ApiScopeRepository.CheckNameExistAsync(input.Name)) { throw new UserFriendlyException(L[AbpIdentityServerErrorConsts.ApiScopeNameExisted, input.Name]); } var apiScope = new ApiScope( GuidGenerator.Create(), input.Name, input.DisplayName, input.Description, input.Enabled, input.Required, input.Emphasize, input.ShowInDiscoveryDocument); await UpdateApiScopeByInputAsync(apiScope, input); await CurrentUnitOfWork.SaveChangesAsync(); apiScope = await ApiScopeRepository.InsertAsync(apiScope); return(ObjectMapper.Map <ApiScope, ApiScopeDto>(apiScope)); }
public virtual async Task <ApiScopeDto> CreateAsync(ApiScopeCreateDto input) { return(await ApiScopeAppService.CreateAsync(input)); }