Does SCA support EF Core Code-First Migrations?
marksnelling
Posts: 4 New member
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.
dotnet ef database update --project .\Core.DataModel\Core.DataModel.csproj --startup-project Core\Core.csprojAll the examples seem to be for EF6 and if I go through the code-first tutorial at 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
Update-Database -Script -Source $InitialDatabaseAny help or advice here would be appreciated.
Tagged:
Answers
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
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools