Cross-server and cross-domain queries
It is time to move to the next level: cross-server or cross-domain queries, for a truly great orchestration experience.
I have experimented with this and it's working nicely:
dynamic odata = Activator.CreateInstance(Type.GetType("LINQPad.User.DemoService, odata", true), new Uri("https://services.odata.org/V3/OData/OData.svc/"));
((object)odata.Persons).Dump();
dynamic a = Activator.CreateInstance(Type.GetType("LINQPad.User.TypedDataContext, a", true));
((object)a.Persons).Dump();
dynamic db = Activator.CreateInstance(Type.GetType("LINQPad.User.TypedDataContext, db", true));
((object)db.Products).Dump();
I'm specifically referring to this line in the FAQ (https://www.linqpad.net/FAQ.aspx):
"The databases that you query must reside on the same server."
That's a major limitation.
Possible solutions:
1. Unique data context class names in the LINQPad.User namespace.
2. extern alias
functionality?
3. Uniquely nest all classes with respect to their connection name (for example, in the db.dll all classes will reside in LINQPad.User.db.* as opposed to the current LINQPad.User.* namespace)
4. With odata you named the resulting class DemoService, perhaps the same could be done with the sql connections