I am launching a port of an existing ColdFusion application for .NET MVC, and one of the first problems I am facing is that in ColdFusion we use the fact that you can define multiple data sources and access them in a dynamic way so that a specific user can be specified in a specific database.
To give an example, I can have two databases: Foo and Bar, each of which has a Locations table that stores locations specific to this database. It is guaranteed that the databases will have the same tables, so this will not be a problem.
In ColdFusion, you can easily dynamically point the user to a specific data source, because it is just a string that is configured by the ColdFusion administrator (or you can programmatically modify the XML file).
So the question is how to do this in .NET?
And in particular, I think that I would really like to use the Entity infrastructure to support the ORM support that it will offer for performing data operations in the database, but I'm not sure how to do it (I hope this will be possible). Any thoughts?
source
share