Still learning the nuances of Linq. Researched, but couldn't find a resolution to what I assume is an easy fix.
Edit: As requested here is the full code block:
//Jboyd pull back all relative orgs
var parent =
from s in Students
where s.Id==5027
select new {
ID_PK = s.CaseOwnerIdAspnet_Users.User_ID_FKDYN_User_Profile.Organization_ID_FKDYN_Organization.Parent_ID_FK == null ?
(int) s.CaseOwnerIdAspnet_Users.User_ID_FKDYN_User_Profile.Organization_ID_FKDYN_Organization.ID_PK
:
(int) s.CaseOwnerIdAspnet_Users.User_ID_FKDYN_User_Profile.Organization_ID_FKDYN_Organization.Parent_ID_FK
};
var orgs =
from o in DYN_Organizations
join p in parent on o.Parent_ID_FK equals p.ID_PK
select new {ID_PK = o.ID_PK};
var unionOrgs = parent.Union(orgs) ;
//unionOrgs is a list of Orgs //the below query: I need to query a bigger table where orgs are in the above list
var userProfilesQuery = from up in DYN_User_Profiles
where unionOrgs.Contains(up.Organization_ID_FK) //this is where the error occurs
select up;
Error: CS1929 'IQueryable<>' does not contain a definition for 'Contains' and the best extension method overload 'ParallelEnumerable.Contains(ParallelQuery, int)' requires a receiver of type 'ParallelQuery'
ulimately the goal is unionOrgs returns a list of orgs. I then want to query a bigger table for any of the orgs within that list
orgs
is a collection of object with the property ofID_PK
s. What are you trying to do?IQueryable<>
inheritsIEnumerable<t>
as @gilad indicated your Orgs is a collection