You need to make changes to the database schema while keeping the existing data intact. Which feature of Entity Framework Code-First should you use?
- Code Migrations
- Data Annotations
- Database Initializer
- Fluent API
Code Migrations is the feature of Entity Framework Code-First that allows you to make changes to the database schema while preserving the existing data. Code Migrations automatically updates the database schema based on changes made to the C# classes, making it easy to evolve the database schema over time without losing data.
Loading...
Related Quiz
- When using connection pooling, the database connection remains open in a ___________ state.
- When working with optimistic concurrency, ADO.NET uses ___________ columns to track changes made to rows.
- Explain the concept of optimistic concurrency in LINQ to SQL.
- DataRelations are used to create ___________ between tables in a dataset.
- What is the purpose of using the .AsNoTracking() method in LINQ to Entities when optimizing queries?