We can enable the automatic migration through the following command –Įnable-migrations –EnableAutomaticMigration:$true If we want to see the SQL statements our migration process applied to the database, we can use -verbose parameter with the update-databaseĪutomated Migration – In this type of migration we don’t have to process the migration manually for every change. Rollback Migration – If we want to rollback our database schema to any previous migration state then we can use the update-database command with the -TargetMigration parameter. The Up() function contains the code for creating the database and Down() function contains the code for dropping or deleting the database objects.įor help with any command, we can execute a command get-help Up and down functions in the migration file Update-database – This command will execute the last migration created by the add-migration command.This command will create a new file with _.cs
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |