I work on a web project, which uses Entity Framework to access a database. Right now, SQL Server Express LocalDB is used for development. The migrations created via dotnet ef migrations add ... contain T-SQL specific for SQL Server.
We want to use SQLite for local development, but changing the connection string now creates new migrations which are mixing SQL Server with SQLite syntax, making it impossible to use.
Since other ORMs (like Django) have their migrations in a database agnostic form, and generate the concrete SQL on the fly for the then configured database engine, does EF also support this kind of operation? If so, how can we enable this?
No, see this issue @github:
The are 2 workarounds:
DbSet's and setup (every child context will have it's own set of migrations)See more: