Пример #1
0
 public ProductsListViewModel GetProduct(string city, string name, IProductRepository repo)
 {
     var model = new ProductsListViewModel
     {
         Products = from p in repo.Products
                    where (p.Name == name && p.City == city)
                    select p
     };
     return model;
 }
Пример #2
0
        public ViewResult List(string city, string name)
        {
            name = name.Replace("—", " ");
            var model = new ProductsListViewModel
                            {
                                Products = from p in _repository.Products
                                           where (p.Name == name && p.City == city)
                                           select p

                            };
            return View(model);
        }
Пример #3
0
 public ActionResult DataCompleted(ProductsListViewModel model)
 {
     //return View((object)model);
     TempData["Model"] = model;
     return RedirectToAction("ListAreas", "Product", new { area = "" });
 }