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.
Loading...
Related Quiz
- The _________ attribute in EF Core can be used to ignore a particular property from being mapped to a database column.
- When a user submits a form in Razor, the data is usually sent to a/an _________ method in a controller.
- You have heard about real-time web technologies and are curious about one that can be used with ASP.NET Core to develop chat applications. Which technology is commonly used for this purpose?
- If you want to code for ASP.NET Core and prefer a lightweight, cross-platform editor, which tool would you likely use?
- To create a user programmatically in ASP.NET Core, you would typically make use of which method?