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
keyProperty
Type: System.Reflection.PropertyInfoThe property to be added to the key properties of this entity type.
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