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); }
public async Task <int> InsertApiScopeAsync(Core.Entities.ApiScope.ApiScope apiScope) { return(await _repository.InsertAsync(apiScope)); }