Exemplo n.º 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;
 }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public ActionResult DataCompleted(ProductsListViewModel model)
 {
     //return View((object)model);
     TempData["Model"] = model;
     return RedirectToAction("ListAreas", "Product", new { area = "" });
 }