public ActionResult Index(IContent currentContent) { var startPage = _loader.Get <StartPage>(ContentReference.StartPage); var model = new PreviewPageViewModel(startPage, currentContent); return(View(model)); }
public ActionResult Index(IContent currentContent) { var loader = ServiceLocator.Current.GetInstance <EPiServer.IContentLoader>(); var startPage = loader.Get <SitePageData>(ContentReference.StartPage); var viewmodel = new PreviewPageViewModel(startPage, currentContent); return(View(viewmodel)); }
public PreviewPage(int id, string name, Models.ImageSource imageSource, int price, string longDescription, CategoryName categoryName, string description) { InitializeComponent(); BindingContext = new PreviewPageViewModel(id, name, imageSource, price, longDescription, categoryName, description); }
public PreviewPageViewModelTests() { Services = new MockAppServiceProvider(); ViewModel = new PreviewPageViewModel(Services); }
public PreviewPage() { InitializeComponent(); BindingContext = new PreviewPageViewModel(AppServiceProvider.Instance); }