Walaa wrote:
Projecting a hierarchical entity fetch, the first example David mentioned, should satisfy your requirement if I understand your question correctly.
Could you please verify this or otherwise please elaborate in more details so we can better answer you?
The first example David mentioned will solve my problem but there is disadvantage to this approach. If I want to project a collection of entities with a 1:N relation (let's say CustomerEntities and OrderEntities) into a custom class, I must first get the EntityCollection including a Prefetch path. There is a enormous performance and memory penalty using entities. Using a plain projection is much more efficient and way faster. I'm only querying the data I want and I'm instantiating low-profile DTO-classes.
The general FetchProjection doesn't allow me to include a Pretfetch path.
The only thing I think of is to extend the FetchProjection method with the possibility of using a Prefetch path.
Could you confirm this or guide me to better solution?
Using: LLBL version 4.0 Adapter model, .NET 3.5 framework