Share via


AsyncEntitySetController<TEntity, TKey>.GetKey Method

This method should be overridden to get the entity key of the specified entity.

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

Syntax

'Declaration
Protected Friend Overridable Function GetKey ( _
    entity As TEntity _
) As TKey
'Usage
Dim entity As TEntity
Dim returnValue As TKey

returnValue = Me.GetKey(entity)
protected internal virtual TKey GetKey(
    TEntity entity
)
protected public:
virtual TKey GetKey(
    TEntity entity
)
abstract GetKey : 
        entity:'TEntity -> 'TKey 
override GetKey : 
        entity:'TEntity -> 'TKey 
function GetKey(
    entity : TEntity
) : TKey

Parameters

Return Value

Type: TKey
The entity key value

See Also

Reference

AsyncEntitySetController<TEntity, TKey> Class

System.Web.Http.OData Namespace