public ActionResult Index(string Occupation, string sorting = "Id") { var data = repo.GetAllWith客戶資料ByOccupation(Occupation).OrderBy(sorting); ViewBag.Occupation = myOccupationSelectList; //var 客戶聯絡人 = db.客戶聯絡人.Include(客 => 客.職稱 == occupation).Where(w => w.IsDeleted != true); return(View(data.ToList())); }