public IActionResult Index()
 {
     return(View(new HomeViewModel
     {
         PathToBikeImage = "/images/bikes/" + BikeImageHelper.GetRandomImage()
     }));
 }
Ejemplo n.º 2
0
 public ModelViewModelProfile()
 {
     CreateMap <Product, ProductViewModel>().ForMember(model => model.PathToImage, opt => opt.MapFrom(_ => "/images/bikes/" + BikeImageHelper.GetRandomImage()));
     CreateMap <ShoppingBag, ShoppingBagViewModel>();
     CreateMap <ShoppingItem, ShoppingItemViewModel>();
     CreateMap <RegisterViewModel, Customer>();
 }