CoreStrings.EntityRequiresKey(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The entity type '{entityType}' requires a primary key to be defined. If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'. For more information on keyless entity types, see https://go.microsoft.com/fwlink/?linkid=2141943.
public static string EntityRequiresKey (object entityType);
public static string EntityRequiresKey (object? entityType);
static member EntityRequiresKey : obj -> string
Public Shared Function EntityRequiresKey (entityType As Object) As String
Parameters
- entityType
- Object
Returns
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework