EF Core - switch to SQL Server with existing MySQL migrations

asp.net-core asp.net-core-2.0 entity-framework-core

Question

I cloned an ASP.NET Core 2 project with git and it uses Entity Framework Core with MySQL database.

services.AddDbContext<ApplicationDbContext>(options =>
            options.UseMySql(Configuration.GetConnectionString("Default")));

Is it possible for me to contribute on this project but use my local SQL Server instead of MySQL and don't change this on source?

I tried changing UseMySql to UseSqlServer with the right connection string but it threw exception in migrations.

1
0
1/23/2018 3:57:56 PM

Popular Answer

Not easily. If the application wasn't designed with this scenario in mind, you may have to update a lot of it to work on Microsoft SQL Server.

If you're just trying to avoid installing MySQL locally, I've found using Docker ideal for that. (See the mysql/mysql-server image.)

1
1/23/2018 5:54:36 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow