Skip to content

Commit

Permalink
Add note on [PrimaryKey] having been introduced in EF 7
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Nov 15, 2022
1 parent cb6f750 commit 4d27aa2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions entity-framework/core/modeling/keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ You can also configure multiple properties to be the key of an entity - this is

### [Data Annotations](#tab/data-annotations)

> [!NOTE]
> The `[PrimaryKey]` attribute was introduced in EF Core 7.0. Use the Fluent API in older versions.
<!--
[PrimaryKey(nameof(State), nameof(LicensePlate))]
internal class Car
Expand Down

0 comments on commit 4d27aa2

Please sign in to comment.