public async Task <PaginatedResponseContract <AssetPairContract> > ListByPages([FromQuery] string legalEntity = null, [FromQuery] MatchingEngineModeContract?matchingEngineMode = null, [FromQuery] string filter = null, [FromQuery] int?skip = null, [FromQuery] int?take = null) { ApiValidationHelper.ValidatePagingParams(skip, take); var data = await _assetPairsRepository.GetByLeAndMeModeByPagesAsync(legalEntity, matchingEngineMode?.ToString(), filter, skip, take); return(new PaginatedResponseContract <AssetPairContract>( contents: data.Contents.Select(x => _convertService.Convert <IAssetPair, AssetPairContract>(x)).ToList(), start: data.Start, size: data.Size, totalSize: data.TotalSize )); }