In Entity Framework, a primary key is automatically configured if the property name is 'Id' or the class name followed by ________.

  • 'EntityKey'
  • 'Identity'
  • 'Key'
  • 'PrimaryKey'
In Entity Framework, when naming conventions are followed, a primary key is automatically configured if the property name is 'Id' or the class name followed by 'Id'. For example, if you have a class named 'Product', the primary key conventionally would be 'ProductId'.
Add your answer
Loading...

Leave a comment

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