Ramco Ramco

Ramco Ramco

  • 443
  • 3.4k
  • 527.2k

Error - Only arguments that can be evaluated on the client are support

Apr 25 2023 3:56 PM

Hi

  I am getting error on below code - Only arguments that can be evaluated on the client are supported for the String.Contains method.

LMSDBDataContext context = new LMSDBDataContext();
                List<View_Recommendation> Result = (from t in context.View_Recommendations
                              where (StudentCollection.Length > 0 ? StudentCollection.Contains(t.StudentID.ToString()) : 1 == 1)
                              select t).ToList();

Thanks


Answers (5)