public virtual async Task <ApiScopePropertiesDto> GetApiScopePropertiesAsync(int apiScopeId, int page = 1, int pageSize = 10) { var apiScope = await ApiScopeRepository.GetApiScopeAsync(apiScopeId); if (apiScope == null) { throw new UserFriendlyErrorPageException(string.Format(ApiScopeServiceResources.ApiScopeDoesNotExist().Description, apiScopeId), ApiScopeServiceResources.ApiScopeDoesNotExist().Description); } PagedList <ApiScopeProperty> pagedList = await ApiScopeRepository.GetApiScopePropertiesAsync(apiScopeId, page, pageSize); var apiScopePropertiesDto = pagedList.ToModel(); apiScopePropertiesDto.ApiScopeId = apiScopeId; apiScopePropertiesDto.ApiScopeName = await ApiScopeRepository.GetApiScopeNameAsync(apiScopeId); await AuditEventLogger.LogEventAsync(new ApiScopePropertiesRequestedEvent(apiScopeId, apiScopePropertiesDto)); return(apiScopePropertiesDto); }