How does ASP.NET Core handle database schema changes if a migration is applied that changes an existing table's structure?

  • It drops and recreates the table
  • It updates the table in place
  • It creates a new table and migrates data
  • It throws an error
ASP.NET Core uses Entity Framework Core to manage database schema changes. When a migration is applied that changes an existing table's structure, it generates SQL commands to update the table in place, preserving existing data. Dropping and recreating the table would result in data loss. Creating a new table and migrating data is not the default behavior.
Add your answer
Loading...

Leave a comment

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