예제 #1
0
        // GET: Customers
        public ActionResult Index()
        {
            #region EF6 Code
            //return View(db.CustomerSet.ToList());
            #endregion

            var customers = _repo.GetCustomersWithOrders();
            customersViewModel.Customers.Clear();
            foreach (var item in customers)
            {
                customersViewModel.Customers.Add(item);
            }
            customersViewModel.DataFilter.Count = customersViewModel.Customers.Count();
            return(View(customersViewModel));
        }