I have a complex bit of filtering to do on a prefetch path that I have extracted to an independent IQueryable called 'regIds'. I then try and use it in the FilterOn but get an error:
Here's the PrefetchPath:
a=>
a.Prefetch<RegulationCountryRegionEntity>(
b=> b.RegulationCountryRegion).FilterOn(
c=> regIds.Contains(c.RegID))
The regIds IQueryable<string> is:
regIds = (from a in MetaData.RegulationCountryRegion
where regsInHeading.Contains(a.RegID)
select a.RegID).Distinct();
Whilst the the IQueryable works just fine in where regIds.Contains(regId) constructs, when I use it in a FilterOn I get this error:
Exception Details: SD.LLBLGen.Pro.ORMSupportClasses.ORMQueryConstructionException: The Contains method on the type System.Linq.Queryable isn't convertable to an LLBLGen Pro construct.
I have tried it with an IQueryable<RegulationCountryRegionEntity> too but that gives the same error.
Is there something obvious I have done wrong?