1 | initial version |
Yes, it is possible to utilize EF Core migrations even if the EF code is distributed among various solutions. The migrations can be created and applied separately for each solution that contains EF code.
To create migrations in a solution, you need to use the EF Core tools. You can either install the tools globally on your machine or install them locally in each solution. Once the tools are installed, you can run the dotnet ef migrations add <migration-name>
command to create a new migration.
When you need to apply the migrations to a database, you can run the dotnet ef database update
command in each solution. If the solutions share the same database, the migrations will be applied sequentially.
Note that you need to make sure that the EF code in each solution targets the same database schema version to ensure that the migrations work correctly across solutions.