Click here to Skip to main content
15,897,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am using entity framework for getting the result from database with the help of the following query:

C#
var resManagerGroup = (from objManagerGroup in objEntities.LK_MANAGER_GROUP
                                  where objManagerGroup.user_id == iManagerId && objManagerGroup.group_id != null
                                  select new
                                  {
                                      groupId = objManagerGroup.group_id
                                  });

           var resAssessmentForMarking = (from objAssessmentsForEvaluation in objEntities.UL_ASSESSMENT_EVALUATION_BY_MANAGER
                                          where (objAssessmentsForEvaluation.assessing_status == 0 || objAssessmentsForEvaluation.assessing_status == 1)
                                          && objAssessmentsForEvaluation.courseLinkId != null
                                          select new
                                          {
                                              assessmentId = objAssessmentsForEvaluation.assessment_Id,
                                              groupId = objAssessmentsForEvaluation.group_Id
                                          });

    resAssessmentForMarking = resAssessmentForMarking.Where(s => resManagerGroup.Contains(s.groupId));



but I am getting the following error:

Error 20 'System.Linq.IQueryable<int>' does not contain a definition for 'Contains' and the best extension method overload 'System.Linq.ParallelEnumerable.Contains<tsource>(System.Linq.ParallelQuery<tsource>, TSource)' has some invalid arguments

Please suggest some solution.

Thanks,

Regards,
Ashish
Posted

1 solution

 
Share this answer
 
Comments
Aashish vermaa 19-Nov-14 5:20am    
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900