How about specifying the primary key that has a different SQL column name than my property name?
I believe the following works:
modelBuilder.Entity<MyEntity>()
.HasKey(myEntity => myEntity.MyId);
modelBuilder.Entity<MyEntity>()
.Property(p => p.MyId)
.HasColumnName("MyCustomColumnNameId");
I'm happy to update the docs with that pending confirmation it would be accepted?
Reference: https://stackoverflow.com/a/48155599/185123
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
How about specifying the primary key that has a different SQL column name than my property name?
I believe the following works:
I'm happy to update the docs with that pending confirmation it would be accepted?
Reference: https://stackoverflow.com/a/48155599/185123
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.