SQL Change Automation with EF Core code first database/entities
brookal
Posts: 14 New member
I have created a set of entity classes using EF Core and going to create a code first database. I have used SQL Change automation in the past with a database first architecture but what is the best way of using sql change automation with a code first database.
I am using VS2019. Do I need to use the standard VS migration function to update my local dev database with code first changes and then use sql change automation to generate the scripts for the target production environments or can i use SQL Change Automation to link my code first entities to the local dev database and also my production enviroments
I am using VS2019. Do I need to use the standard VS migration function to update my local dev database with code first changes and then use sql change automation to generate the scripts for the target production environments or can i use SQL Change Automation to link my code first entities to the local dev database and also my production enviroments
Tagged:
Answers
There used to be more on EF CodeFirst in version 3, but from version 4.1.20006 release notes:
So that the advice!
Kind regards,
Alex
Have you visited our Help Center?
After that, can I then create a deployment project to create/deploy the change scripts to my integration and production databases.
If you are using SCA in VS, you would have migrations being written there (based on the EF recommendation above, you would either copy the EF migrations each into their own migrations or apply the changes to your dev database and then use SCA to import the migrations).
You then use the SCA in VS project as the source of PowerShell components, whether that is using the cmdlets specifically or using addons for some of the various build/deployment tools available.
Have you visited our Help Center?