// GET: 客戶聯絡人 public ActionResult Index(int page = 1, string sorting = "Id") { int currentPage = page < 1 ? 1 : page; var data = repo.GetAllWith客戶資料().AsQueryable().OrderBy(sorting); var final = data.ToPagedList(currentPage, 10); ViewBag.Occupation = myOccupationSelectList; //var 客戶聯絡人 = db.客戶聯絡人.Include(客 => 客.客戶資料).Where(w => w.IsDeleted != true); return(View(final)); }