示例#1
0
        public ActionResult Gallery(string id)
        {
            var viewModel = new PortfolioViewModel();
            viewModel.Categories = manager.Categories;

            viewModel.SelectedWork = (from c in viewModel.Categories
                                      from w in c.Works
                                      where w.Name == id
                                      select w).Single();

            viewModel.SelectedWork.IsSelected = true;
            viewModel.SelectedWork.Category.IsSelected = true;

            return View(viewModel);
        }
示例#2
0
 public ActionResult Index()
 {
     var viewModel = new PortfolioViewModel();
     viewModel.Categories = manager.Categories;
     return View(viewModel);
 }