I would like to know if there is a way to replace this syncronized enumeration with something that enumerates both database results in parallel?
I've been doing some research, and as far as I can tell I have to create a new instance of the context for each thread, or perhaps even locking the same context instance until both results are completed (if possible?).
What are my options in .NET 4.0 (C# 4.0)?
using (var context = new DbContext())
{
IEnumerable<T1> dfd1 = context.T1;
IEnumerable<T2> dfd2 = context.T2;
var result1 = dfd1.ToList();
var result2 = dfd2.ToList();
}