Last post May 06, 2015 06:06 AM by Zhi Lv - MSFT
Apr 30, 2015 02:57 AM|rpk2006|LINK
I have 9 databases with around 3000 tables (combined).
I have only one .edmx file pointing to a single database. Do I need to add 9 .edmx files for each database?
How to handle multiple databases with EF 6?
Apr 30, 2015 04:28 AM|PatriceSc|LINK
You should have a constructor that allows to tell which connection string or connection string name you want to use. I would inherit from this class and would put my logic Inside this (for example selecting the database name depending on the web server hostname).
Apr 30, 2015 01:50 PM|neoaguil17|LINK
You should use Entity Framework Code-First instead Database First, because with many tables the edmx is slow, with Code-First, you create your own classes by database
It's the best option to EF.
May 06, 2015 06:06 AM|Zhi Lv - MSFT|LINK
From my point of view, I suggest you could create multiple entity data model items, and you could create a new class (e.g. repository) to manage them (e.g. get, update).
Here is a similar threads, you could refer to it.
Is possible to use a single EMDX Mapping multiple databases