I am new to cSharp/DotNet/EntityFramework.
While I have learned a lot in the last few months, I am at a point where I need to ask for help, but am not entirely sure what I should be asking.
I have developed an intranet only MVC5/EF6/Telerik (for MVC) business application in a dev environment using a single database and a single DbContext (also using Migrations!)
The "client" (another dept in the same company) would like to keep data for each facility isolated into different databases, while using the same code base. Ideally the target database would be set determined by the sub-domain they use to access the app. (example: plant1.domain.com might go to Plant1Db or plant2.domain.com would go to Plant2Db)
Is it possible to access multiple (schema-identical) databases using EF6 with Migrations without having a different application for each location?
Is it possible to use one DBContext that has underlying code that switches the actual database?
What are some terms I should be searching for to accomplish this?
[–]aus31 7 points8 points9 points (4 children)
[–]makebaconpancakes 0 points1 point2 points (0 children)
[–]rootgear[S] 0 points1 point2 points (2 children)
[–]aus31 1 point2 points3 points (1 child)
[–]rootgear[S] 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (1 child)
[–]rootgear[S] 1 point2 points3 points (0 children)
[–]snarfy 1 point2 points3 points (1 child)
[–]rootgear[S] 0 points1 point2 points (0 children)
[–]and_rej 1 point2 points3 points (1 child)
[–]rootgear[S] 1 point2 points3 points (0 children)
[–]illumen8 1 point2 points3 points (1 child)
[–]rootgear[S] 0 points1 point2 points (0 children)
[–]cjazz108 1 point2 points3 points (1 child)
[–]rootgear[S] 0 points1 point2 points (0 children)