You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support migrations for the same DbContext in the same assembly for multiple providers #29343
Currently if you have the same DbContext that needs multiple providers, you have to create a different assembly for each provider migrations (as stated here), this not only slows down the development but it forces the project architecture in a certain way (you need an assembly with the DbContext to be referenced by the multiple migrations assembly that then are referenced by the main project).
I think it would be better if the tools understand that if you create a migration with a different provider, it has to be treated as a different one, all in the same assembly (in different folders of course)
Currently, the path of least resistance is to use a separate DbContext type for each provider. (They can share a common base DbContext type.) This can be improved once we know which provider the migrations were generated for (also needed for issue #15174).
changed the title [-]Is there any plan to support migrations for the same DbContext on the same assembly on multiple providers?[/-][+]Support migrations for the same DbContext in the same assembly for multiple providers?[/+]on Dec 3, 2024
changed the title [-]Support migrations for the same DbContext in the same assembly for multiple providers?[/-][+]Support migrations for the same DbContext in the same assembly for multiple providers[/+]on Dec 3, 2024
Activity
ajcvickers commentedon Oct 20, 2022
@bricelam I looked into this a bit and I don't see an easy way to make it work and can't find an issue on the backlog for it.
bricelam commentedon Oct 24, 2022
Currently, the path of least resistance is to use a separate DbContext type for each provider. (They can share a common base DbContext type.) This can be improved once we know which provider the migrations were generated for (also needed for issue #15174).
[-]Is there any plan to support migrations for the same DbContext on the same assembly on multiple providers?[/-][+]Support migrations for the same DbContext in the same assembly for multiple providers?[/+][-]Support migrations for the same DbContext in the same assembly for multiple providers?[/-][+]Support migrations for the same DbContext in the same assembly for multiple providers[/+]