The ________ method in Fluent API is used to specify that a property is a foreign key.

  • 'Foreign'
  • 'ForeignKey'
  • 'HasForeignKey'
  • 'ReferencedBy'
In Fluent API of Entity Framework, the 'HasForeignKey' method is used to specify that a property is a foreign key. This method is typically used in the configuration of relationships between entities to explicitly define the foreign key property.
Add your answer
Loading...

Leave a comment

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