Which approach allows for configuration of relationships without modifying the entity classes?

  • Code-First approach
  • Data Annotations
  • Database-First approach
  • Fluent API
Fluent API allows for configuring relationships without modifying the entity classes directly. This approach is particularly useful in scenarios where you cannot or prefer not to modify the entity classes, such as when working with entities generated from a database schema or when you want to keep your entity classes clean and focused solely on representing the domain model. By using Fluent API, you can configure relationships, define constraints, and customize other aspects of the model without cluttering the entity classes with mapping information or attributes.
Add your answer
Loading...

Leave a comment

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