0

I'm using LinqPad and LinqKit to try to learn more about linq to construct complex queries, but I seem to be stuck on simple queries. I haven't found a solution to the error in the question description when I input the following -simple- expression:

QHPatients.AsExpandable().Where(p =>
    p.QHEncounters.Where(PredicateBuilder.True<QHEncounter>().Compile()).Any())

If I run the code in VS I get the following error instead: "System.InvalidOperationException : Internal .NET Framework Data Provider error 1025"

circuitlego
  • 3,469
  • 5
  • 22
  • 22

1 Answers1

0
p.QHEncounters.Where(PredicateBuilder.True<QHEncounter>().Compile())

Without knowing the actual types you use, I guess you will need to either call .AsExpandable() on your QHEncounters or omit the .Compile() call.

nvoigt
  • 75,013
  • 26
  • 93
  • 142