I'd like to discuss this a bit more. A joined set is not going to be feasible for some cases, where I've a lot of of subpaths, where filters, its going to bloat the payload with repeated parent columns too much.
I'm not sure I am convinced that it is not possible to serialize a LLBLGenProQuery<T>
. I'm going to investigate, but the principal is that given a method
public EntityCollectionBase2<T> FetchCollection<T>(IQueryable<T> q, [CallerMemberName] string methodName = "caller not specified") where T : EntityBase2
That returns an EntityCollection, when that method returns, all of the prefetches have been done, after each parent set is returned. So if you could serialize q
you could remote that method call and it would be one round trip. I.e. this code
((LLBLGenProProvider2)q.Provider).AdapterToUse = tsw.DataAccessAdapter;
var c = ((ILLBLGenProQuery)q).Execute<EntityCollectionBase2<T>>();
will execute all the queries. PrefetchPathElement2
itself is serializable, so maybe if I extract the prefetch paths out from LLBLGenProQuery<T>
wrap them in some new tree structure that is serializable.... ?