예제 #1
0
        protected object SearchData(SearchPackage searchPackage)
        {
            var brandFilterSelections = _adminQueries.GetBrandFilterSelections();
            var products    = _gameQueries.GetBrandProducts().Where(x => brandFilterSelections.Contains(x.BrandId));
            var dataBuilder = new SearchPackageDataBuilder <BrandProductData>(searchPackage, products.AsQueryable());

            dataBuilder
            .Map(record => record.BrandId + "," + record.GameProviderId + ',' + record.LicenseeId,
                 record =>
                 new object[]
            {
                record.BrandName,
                record.GameProviderName,
                record.CreatedBy,
                Format.FormatDate(record.DateCreated, false),
                record.UpdatedBy,
                Format.FormatDate(record.DateUpdated, false),
            }
                 );
            return(dataBuilder.GetPageData(record => record.BrandName));
        }