I have put the the edmx files inside a subfolder of App_Code closed and restarted Visual Studio, and it has added the namespace.
So now the two EDMX are isolated and I get anymore errors.
So if you have three different Databases DB1, DB2 and DB3, you can create three different folders in the App_Code folder:
App_Code\Db1Model
App_Code\Db2Model
App_Code\Db3Model
Then inside Db1Model folder create a new ADO.NET Entity Data Model for DB1.
In the wizard window when you have to "Select your database objects and settings", you can insert also the "Model Namespace".
Repeat the above tasks for all the databases, using different namespace and putting the model in a new folder.
Try to build the Web Site, if you get the error
"The type Db1.TableName already contains a definition for SomeDbField"
Close Visual Studio and reload the web site.
Tested with Visual Studio 2012, Visual Studio 2015 community edition and EF6.
Why I need to have multiple Data Model?
- If you need to build a aggregated reporting web site reading from different databases of other existing applications.
- Data migration project
- Many other reasons...
Why I want to use New Web Site and not the New Project?
The main reason is that "Web Site" is faster in developing/debugging, as you don't have to recompile on every little change you do in the code-behind.
Deploying it's easier as I have to upload only the changed file.
I can do quick and simple changes also without Visual Studio.
More flexibility, more risk of messing up everything. I know, but depends on how we are used to work and projects needs.
For more info read this: Difference between 'Web Site' and 'Project' in Visual Studio