Is it possible to choose a specific database that will be used with the entity framework?
At this time, I use the connection string in the Web.Config as database authentication.
I have twelve databases, each of them has the same structure and the same stored procedure.
There is one database for each client. When a client wants to login into the system, he needs to choose his database name from a listbox.
I would like to create a dynamic connection string which will include the database name chosen by the client.
One method might be to load all the 12 choices in a dropdownlist.
When the user makes a choice, put that key into
Session.Then supply that conn string to your repo/data layer at runtime.
There are lots of opportunities to improve this:
KeyValuePair<int,string>, and store only the key integer inSession. Then look up the value when hitting the database.