The ________ method in Fluent API is used to specify a foreign key relationship in Entity Framework.

  • ForeignRelation
  • HasForeignKey
  • Relationship
  • WithForeignKey
In Fluent API, the .HasForeignKey() method is used to specify a foreign key relationship between entities in Entity Framework. This method allows developers to define the foreign key property explicitly and configure the relationship between related entities.
Add your answer
Loading...

Leave a comment

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