Share via


EntityTypeConfiguration.HasKey Method (PropertyInfo)

 

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

Namespace:   System.Web.OData.Builder
Assembly:  System.Web.OData (in System.Web.OData.dll)

Syntax

public virtual EntityTypeConfiguration HasKey(
    PropertyInfo keyProperty
)
public:
virtual EntityTypeConfiguration^ HasKey(
    PropertyInfo^ keyProperty
)
abstract HasKey : 
        keyProperty:PropertyInfo -> EntityTypeConfiguration
override HasKey : 
        keyProperty:PropertyInfo -> EntityTypeConfiguration
Public Overridable Function HasKey (
    keyProperty As PropertyInfo
) As EntityTypeConfiguration

Parameters

Return Value

Type: System.Web.OData.Builder.EntityTypeConfiguration

Returns itself so that multiple calls can be chained.

See Also

EntityTypeConfiguration Class
System.Web.OData.Builder Namespace

Return to top