public ActionResult List() { var items = _repository.Getproducts(); var model = new ProductGridModel //2 { Items = items, Count = items.Count() }; //return View(items); return(View(model)); }
public ActionResult List() { // tests connection //using (var db = new SportShopContext()) //{ // var customer = new Customer // { // Email = "test@test" // }; // db.Customers.Add(customer); // db.SaveChanges(); //} var items = _repository.Getproducts(); var model = new ProductGridModel //2 { Items = items, Count = items.Count() }; //return View(items); return(View(model)); }