Beispiel #1
0
        public static PagingResultView <SkuPageListView> ToPagingResultView(PagingResult <Sku> pagingResult)
        {
            var pageSet = ToView(pagingResult.Result);

            PagingResultView <SkuPageListView> views = new PagingResultView <SkuPageListView>(pagingResult.PageCount, pageSet);

            return(views);
        }
Beispiel #2
0
        public static PagingResultView <CategroyProductView> ToViews(PagingResult <Sku> entity)
        {
            IList <CategroyProductView> productViews = new List <CategroyProductView>();

            foreach (var item in entity.Result)
            {
                productViews.Add(new CategroyProductView
                {
                    img    = ImgDescView.GetImg(ImgDescView.ToView(item.SkuImgs.FirstOrDefault())),
                    skudId = item.Id,
                    title  = item.Title
                });
            }

            PagingResultView <CategroyProductView> paging = new PagingResultView <CategroyProductView>(entity.PageCount, productViews);

            return(paging);
        }