one datacontext multiple databases RRS feed

  • Question

  • Is it possible to have one datacontext that has tables in it from multiple databases?
    I don't suspect this is possible.
    I could create views into the tables from the other database, but would rather not do that.
    Friday, December 4, 2009 5:24 PM


  • If the databases are located on the same server it is technically possible to achieve this although it is not documented/supported/available from the tooling.

    You need to get the table into the DBML file - perhaps copying it from another - and then change the tablename from "dbo.Customers" to "myotherdatabase.dbo.Customers"

    • Marked as answer by ralphd42 Saturday, December 5, 2009 2:38 PM
    Friday, December 4, 2009 9:09 PM