// GET: Customer public ActionResult Index() { var customerModel = new CustomerModels(); customerModel.Customers = repo.Find(new FindAll<Customer>()).ToList(); if (customerModel.Customers.Count == 0) { return RedirectToAction("First"); } repo.Context.Commit(); return View(customerModel); }
// GET: Customer public ActionResult Index() { var customerModel = new CustomerModels(); customerModel.Customers = repo.Find(new FindAll<Customer>()).ToList(); if (customerModel.Customers.Count == 0) { return RedirectToAction("First"); } customerModel.Customers.OrderBy(c => c.DateCreated); return View(customerModel); }