I\'ve read Rick Strahl\'s article on Linq to SQL DataContext Lifetime Management hoping to find some answers on how I would manage my .dbml files since they are so closely r
Say you have a database:
Database D contains tables A, B, C, X, Y, Z where
Say you have 2 DBML files P and Q based on database D
AFAIK, there is no way for DBML files P and Q to contain an association between entities A' and X'. This is the single biggest problem with having multiple DBML files.
To my mind, a DBML file reflects the data-model represented by the tables and constraints on those tables in a database. If some tables or constraints are missing from a set of DBML files, then the set of DBML files do not accurately reflect the underlying database.
Going back to our example, if there was no relationship between tables A and X in database D, then one would be able to create 2 DBML files.
Generically speaking, one can have multiple DBML files if each DBML file contains all entities and relationships that are connected. Note that the converse is not a problem, i.e., one can have a single DBML file containing multiple groups of entities that are not related to each other by any associations.