Share via


EntitySetController<TEntity, TKey>.CreateLink Method

This method should be overridden to handle POST and PUT requests that attempt to create a link between two entities.

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

Syntax

'Declaration
<AcceptVerbsAttribute()> _
Public Overridable Sub CreateLink ( _
    key As TKey, _
    navigationProperty As String, _
    link As Uri _
)
'Usage
Dim instance As EntitySetController 
Dim key As TKey
Dim navigationProperty As String 
Dim link As Uri

instance.CreateLink(key, navigationProperty, _
    link)
[AcceptVerbsAttribute()]
public virtual void CreateLink(
    TKey key,
    string navigationProperty,
    Uri link
)
[AcceptVerbsAttribute()]
public:
virtual void CreateLink(
    TKey key, 
    String^ navigationProperty, 
    Uri^ link
)
[<AcceptVerbsAttribute()>]
abstract CreateLink : 
        key:'TKey * 
        navigationProperty:string * 
        link:Uri -> unit 
[<AcceptVerbsAttribute()>]
override CreateLink : 
        key:'TKey * 
        navigationProperty:string * 
        link:Uri -> unit
public function CreateLink(
    key : TKey, 
    navigationProperty : String, 
    link : Uri
)

Parameters

  • key
    Type: TKey
    The key of the entity with the navigation property.
  • navigationProperty
    Type: System.String
    The name of the navigation property.
  • link
    Type: System.Uri
    The URI of the entity to link.

See Also

Reference

EntitySetController<TEntity, TKey> Class

System.Web.Http.OData Namespace