Exemple #1
0
        private async Task <ApiScope> CreateApiScopeAsync(string name)
        {
            var apiScope = await _apiScopeRepository.GetByNameAsync(name);

            if (apiScope == null)
            {
                apiScope = await _apiScopeRepository.InsertAsync(
                    new ApiScope(
                        _guidGenerator.Create(),
                        name,
                        name + " API"
                        ),
                    autoSave : true
                    );
            }

            return(apiScope);
        }
Exemple #2
0
 public async Task <int> InsertApiScopeAsync(Core.Entities.ApiScope.ApiScope apiScope)
 {
     return(await _repository.InsertAsync(apiScope));
 }