Share via


EntityTypeConfiguration.HasKey(PropertyInfo) Method

Definition

Configures the key property(s) for this entity type.

public virtual Microsoft.AspNet.OData.Builder.EntityTypeConfiguration HasKey (System.Reflection.PropertyInfo keyProperty);
abstract member HasKey : System.Reflection.PropertyInfo -> Microsoft.AspNet.OData.Builder.EntityTypeConfiguration
override this.HasKey : System.Reflection.PropertyInfo -> Microsoft.AspNet.OData.Builder.EntityTypeConfiguration
Public Overridable Function HasKey (keyProperty As PropertyInfo) As EntityTypeConfiguration

Parameters

keyProperty
PropertyInfo

The property to be added to the key properties of this entity type.

Returns

Returns itself so that multiple calls can be chained.

Applies to