我的代码中有上述环形异常。我尝试将 where 子句与列表变量一起使用,这就是我使用 Contains 方法的原因,但我不断收到错误,我不明白我做错了什么
List<string> TouristID = (List<string>)Session["TouristID"];
List<Tourist> customerInterests = (from tourist in db2.Tourist
where (TouristID.Contains(tourist.Tourist_ID.ToString()))
select tourist).ToList();
foreach (var customer in customerInterests)
{
String strName_kir = customer.Name_kir;
String Lastname_kir = customer.Midname_kir;
}