In Code-First development, how are database tables created based on entity classes?
- By defining entity classes and configuring them with attributes or fluent API, then using migrations to create or update the database schema
- By directly creating database tables in SQL Server Management Studio and mapping them to entity classes
- By generating entity classes from an existing database schema using the Entity Data Model Wizard
- By utilizing scaffolding tools to generate entity classes from database tables automatically
Code-First development in Entity Framework allows developers to define entity classes and their relationships in code without having to design the database schema upfront. This is typically achieved by defining entity classes and configuring them with attributes or fluent API to specify details such as table names, column names, and relationships. Developers can then use migrations to create or update the database schema based on these entity classes.
Loading...
Related Quiz
- Which LINQ technology is more suitable for querying in-memory data structures like lists and arrays?
- In ADO.NET, what is the difference between a DataView and a DataTable?
- What is the purpose of the SelectCommand property in a DataAdapter?
- What is the difference between a DataRow and a DataTable in ADO.NET?
- In Entity Framework, the concept of ___________ allows you to customize how properties in an entity map to columns in a database table.