LINQPad, using multiple datacontexts

Update: it’s now possible to do cross-database SQL Server queries in LINQPad (from LINQPad v4.31, with a LINQPad Premium license). To use this feature, hold down the Control key while dragging databases from the Schema Explorer to the query window.

It’s also possible to query linked servers (that you’ve linked by calling sp_add_linkedserver). To do this:

  1. Add a new LINQ to SQL connection.
  2. Choose Specify New or Existing Database and choose the primary database you want to query.
  3. Click the Include Additional Databases checkbox and pick the linked server(s) from the list.

Leave a Comment