ExtensionMethods.HasDeclaredKeyProperty Method

Checks whether the given entity type has the property as one of the key properties.

Namespace:  Microsoft.Data.Edm
Assembly:  Microsoft.Data.Edm (in Microsoft.Data.Edm.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function HasDeclaredKeyProperty ( _
    entityType As IEdmEntityType, _
    property As IEdmProperty _
) As Boolean
'Usage
Dim entityType As IEdmEntityType 
Dim property As IEdmProperty 
Dim returnValue As Boolean 

returnValue = entityType.HasDeclaredKeyProperty(property)
public static bool HasDeclaredKeyProperty(
    this IEdmEntityType entityType,
    IEdmProperty property
)
[ExtensionAttribute]
public:
static bool HasDeclaredKeyProperty(
    IEdmEntityType^ entityType, 
    IEdmProperty^ property
)
static member HasDeclaredKeyProperty : 
        entityType:IEdmEntityType * 
        property:IEdmProperty -> bool
public static function HasDeclaredKeyProperty(
    entityType : IEdmEntityType, 
    property : IEdmProperty
) : boolean

Parameters

Return Value

Type: System.Boolean
true if the type or base types has given property declared as key. false otherwise.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEdmEntityType. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.113) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.113).

See Also

Reference

ExtensionMethods Class

Microsoft.Data.Edm Namespace