Suppose you have a single web portal application that is used by a number of different clients. For reasons of security and portability, each client’s data must reside in a separate database. The schema for each of these databases is absolutely identical.
How does one go about accessing these separate databases from a single SQL Server, and how does one tell the Linq to SQL data classes which database to access?
All objects in the context are defined using two part names (schema.object) and at runtime you just create the context using a connection string pointing to the right database.