EntityTypeConfiguration.HasKey Method
Configures the key property(s) for this entity type.
Namespace: System.Web.Http.OData.Builder
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Syntax
'Declaration
Public Overridable Function HasKey ( _
keyProperty As PropertyInfo _
) As EntityTypeConfiguration
'Usage
Dim instance As EntityTypeConfiguration
Dim keyProperty As PropertyInfo
Dim returnValue As EntityTypeConfiguration
returnValue = instance.HasKey(keyProperty)
public virtual EntityTypeConfiguration HasKey(
PropertyInfo keyProperty
)
public:
virtual EntityTypeConfiguration^ HasKey(
PropertyInfo^ keyProperty
)
abstract HasKey :
keyProperty:PropertyInfo -> EntityTypeConfiguration
override HasKey :
keyProperty:PropertyInfo -> EntityTypeConfiguration
public function HasKey(
keyProperty : PropertyInfo
) : EntityTypeConfiguration
Parameters
- keyProperty
Type: System.Reflection.PropertyInfo
The property to be added to the key properties of this entity type.
Return Value
Type: System.Web.Http.OData.Builder.EntityTypeConfiguration
Returns itself so that multiple calls can be chained.