//private 客戶資料Entities db = new 客戶資料Entities(); // GET: Customer public ActionResult Index(string customerName, string customerType, int page = 1, string orderCustomerName = "") { ViewBag.客戶分類List = Get客戶分類(customerType); page = page < 1 ? 1 : page; ViewData.Model = repo.GetSearchCustomerList(customerName, customerType).OrderByDescending(o => o.Id).GetOrderCustomerList(orderCustomerName).ToPagedList(page, 2); // return(View()); }