Entity Framework - first code model validation
In my project, I am using Entity Framework 6.1.1 with my first code migration.
When I make changes to the model, I can sync my database with these commands in the Package Manager Console:
PM> Add-Migration "MIGRATION-NAME"
PM> Update-Database
I am currently doing a few changes to my model, is there any command I can run to test my model?
+3
source to share
1 answer
I believe you mean the validation variant that we get in the Model First approach. There is no separate validation command for the code at first if Add-Migration fails gives validation error. Since this command is executed in a transaction, all partial changes to this command will be rolled back in the event of any error.
0
source to share