次のようなクエリがあります。
surveyCompleted = from s in surveyCompleted
where agentTickets.Contains(s.TicketID.Value) || s.UserID == new Guid(txtUserID.Text) select s;
問題は、このステートメントの後、InvalidCastExceptionが発生するため、surveyCompletedでは何もできないことです。なぜこれが起こるのか考えはありますか?SurveyCompletedを使用した他のすべてのselectステートメントは正常に機能しますが、これは失敗しますか?where句のステートメント「agentTickets.Contains(s.TicketID.Value)」からでしょうか?