Exemple #1
0
 public static IEnumerable <ProductOverviewViewModel> MapProductsToViewModels(IEnumerable <ProductModel> products)
 {
     return(products.Select(
                a => new ProductOverviewViewModel()
     {
         Title = a.Title,
         Url = TourtechUrlHelper.GetProductUrl(a.Name),
         ImageUrl = TourtechUrlHelper.GetImageUrl(a.ImageRelativeUrl)
     }
                ));
 }
Exemple #2
0
 public static ImageViewModel MapImageToViewModel(ImageModel image)
 {
     return(new ImageViewModel(image.Title, TourtechUrlHelper.GetImageUrl(image.ImageRelativeUrl)));
 }