For initial database setup in a code-first approach, the ________ command is used to create the database schema based on the model.

  • Add-Migration
  • EnsureCreated
  • Scaffold-DbContext
  • Update-Database
For initial database setup in a code-first approach, the Add-Migration command is used to create the database schema based on the model. This command generates a migration file containing the necessary changes required to synchronize the database schema with the current model. It's a crucial step in the code-first workflow of Entity Framework Core as it allows developers to maintain a versioned history of database schema changes.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *