LinkGenerationHelpers.GenerateSelfLink Method (EntityInstanceContext, Boolean)
Generates a self link following the OData URL conventions for the entity represented by entityContext.
Namespace: System.Web.Http.OData.Builder
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Syntax
public static string GenerateSelfLink(
this EntityInstanceContext entityContext,
bool includeCast
)
public:
[ExtensionAttribute]
static String^ GenerateSelfLink(
EntityInstanceContext^ entityContext,
bool includeCast
)
static member GenerateSelfLink :
entityContext:EntityInstanceContext *
includeCast:bool -> string
<ExtensionAttribute>
Public Shared Function GenerateSelfLink (
entityContext As EntityInstanceContext,
includeCast As Boolean
) As String
Parameters
entityContext
Type: System.Web.Http.OData.EntityInstanceContextThe EntityInstanceContext representing the entity for which the self link needs to be generated.
includeCast
Type: System.BooleanRepresents whether the generated link should have a cast segment representing a type cast.
Return Value
Type: System.String
The self link following the OData URL conventions.
See Also
LinkGenerationHelpers Class
System.Web.Http.OData.Builder Namespace
Return to top