Sample for Migrations with Multiple Providers does not work #25023
Labels
area-migrations
customer-reported
punted-for-7.0
Originally planned for the EF Core 7.0 (EF7) release, but moved out due to resource constraints.
type-enhancement
Milestone
I was following the documentation for migrations with multiple providers and stumbled upon an issue.
I was trying to create migrations for multiple providers using one context type and used the sample provided.
If I run
dotnet ef database update
ordotnet ef database update -- --provider SqlServer
from theWorkerService1
directory, the databases get updated/created.However, if I try to do this programmatically using
db.Database.Migrate()
for instance here inWorker.cs
, I get the following exceptionEF Core version: 5.0.2
Database provider: Microsoft.EntityFrameworkCore.SqlServer + Microsoft.EntityFrameworkCore.Sqlite
Target framework: NET 5.0
Operating system: Ubuntu
IDE: VS Code
The text was updated successfully, but these errors were encountered: