Page 1 of 1

How to support multiple Database at Entity Framework Core

Posted: Fri 09 Jul 2021 09:17
by ivoryguard
Hello.

I have implemented multiple DB support in a single .NET Framework 4.6 project with DB-First EDMX way at Entity Framework 6.

Now, I will covert my existing app to.NET 5 app using Entity Framework Core including Code first migration. I want to support MSSQL, Oracle, MySQL in a single .NET 5 project by changing DB connection string only.

I have already purchased latest DotConnect for Oracle and MySQL.

Could you please let me know how I can support multiple Database in a single .NET 5 project?

Best regards.

Re: How to support multiple Database at Entity Framework Core

Posted: Mon 12 Jul 2021 12:39
by Shalex
We will notify you when the Database Independent property of the EF Core template is implemented.

As a workaround, you can run Regenerate Storage and Mapping from the diagram's context menu. It will clear all SQL Type values for columns. The drawback is that it will clear table name values as well so the table names will be determined automatically based on the class names.

Re: How to support multiple Database at Entity Framework Core

Posted: Fri 08 Oct 2021 05:51
by ivoryguard
I implemented it according to the following post and it worked well :)
https://dev.to/moesmp/ef-core-multiple- ... iders-3gb7

Best regards.

Re: How to support multiple Database at Entity Framework Core

Posted: Fri 08 Oct 2021 16:09
by Shalex
Thank you for providing a possible solution. We will notify you when the feature is implemented.