I am returning a List<> of entities that I'm fetching via LINQ to LLBL. My LINQ query specifies a prefetch path.
The odd thing is that some of my entities are missing their related entities that should have been fetched via the prefetch.
I can see the two queries LLBL executes via Profiler, and I see data coming back for the entities that should be prefetched.
To illustrate:
DB:
Contract 1 FK-> Customer 1
Contract 2 FK-> Customer 2
SQL executed by LLBL:
First query returns Contract 1 and Contract 2
Second query returns Customer 1 and Customer 2
LLBL:
Contract 1.Customer = Customer 1
Contract 2.Customer = NULL
If the query LLBL executes to fetch the entities I've specified in a prefetch, and data is being returned, why aren't the entities being associated with the parent entities?
Thanks for any insight into what's going on!