views:

433

answers:

1

I am often comparing data in tables in different databases. These databases do NOT have the same schema. In TSQL, I can can reference them with the DB>user>table structure (DB1.dbo.Stores, DB2.dbo.OtherPlaces) to pull the data for comparison. I like the idea of LinqPad quite a bit, but I just can't seem to easily pull data from two different data contexts within the same set of statments.

I've seen people suggest simply changing the connection string to pull the data from the other source into the current schema but, as I mentioned, this will not do. Did I just skip a page in the FAQ? This seems a fairly routine procedure to be unavailable to me.

In the "easy" world, I'd love to be able to simply reference the typed datacontext that LinqPad creates. Then I could simply:

DB1DataContext db1 = new DB1DataContext();

DB2DataContext db2 = new DB2DataContext();

And work from there.

If anyone has a suggestion, I'd surely appreciated it. Thanks.

+3  A: 

I do not think you are able to do this. See this LinqPad request.

However, you could build multiple dbml files in a separate dll and reference them in LinqPad.

Jeremy Roberts
So far, this has been my conclusion as well. I was hoping I was wrong! Thanks much.
Scott