Is there a way to create AsyncParallelTask as a variable and then add queries to it? For example:
var asyncParallelTask = AsyncParallelTask.Create();
asyncParallelTask.AddAsyncQuery(1, x => mgr.Customers);
asyncParallelTask.AddAsyncQuery(2, x => mgr.Employees);
asyncParallelTask.Execute(cb => {
((EntityFetchedEventArgs <Customer>)cb.CompletionMap[1])
.Result.ForEach(c => Debug.WriteLine(c.CompanyName));
((EntityFetchedEventArgs <Employee>)cb.CompletionMap[2])
.Result.ForEach(e => Debug.WriteLine(e.LastName));
});
It would sure be nice to dynamically build these, so I want to ask before I give up on this approach. Obviously, the above does not work.
Thanks!