We are investigating using SCA to help with migrations in our EF Core 2.1 code-first project. The issue leading us to look at SCA is when deploying migrations to the target database using the CLI the dotnet tool needs access to the source code. E.g. https://documentation.red-gate.com/sca3/tutorials/worked-examples/work-with-entity-framework-codefirst-migrations I get errors when issuing the command below saying the command is unrecognised Any help or advice here would be appreciated.
All the examples seem to be for EF6 and if I go through the code-first tutorial at
Comments
1 comment
-
Our integration with Entity Framework only works with 6.x and earlier; we rely on the Automatic Migrations feature to generate T-SQL migrations, which was not ported across to EF Core. This means that a database-first approach is now required when working with EF Core, rather than using EF's model of the database to generate migrations.
The basic steps for a db-first workflow are:
1. Modify the database with the desired changes
2. Use the SCA tool-window to import the changes into the project. This generates a script based on the model that SCA maintains.
3. Modify the model classes in EF Core to reflect the changes
Add comment
Please sign in to leave a comment.