Share via


LinkGenerationHelpers.GenerateSelfLink(ResourceContext, Boolean) Method

Definition

Generates a self link following the OData URL conventions for the entity represented by resourceContext.

public static Uri GenerateSelfLink (this Microsoft.AspNet.OData.ResourceContext resourceContext, bool includeCast);
static member GenerateSelfLink : Microsoft.AspNet.OData.ResourceContext * bool -> Uri
<Extension()>
Public Function GenerateSelfLink (resourceContext As ResourceContext, includeCast As Boolean) As Uri

Parameters

resourceContext
ResourceContext

The ResourceContext representing the entity for which the self link needs to be generated.

includeCast
Boolean

Represents whether the generated link should have a cast segment representing a type cast.

Returns

Uri

The self link following the OData URL conventions.

Applies to