Share via


EntityInstanceContext Class

 

An instance of EntityInstanceContext<TEntityType> gets passed to the self link ( M:EntitySetConfiguration.HasIdLink, M:EntitySetConfiguration.HasEditLink, M:EntitySetConfiguration.HasReadLink ) and navigation link ( M:EntitySetConfiguration.HasNavigationPropertyLink, M:EntitySetConfiguration.HasNavigationPropertiesLink ) builders and can be used by the link builders to generate links.

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

Inheritance Hierarchy

System.Object
  System.Web.Http.OData.EntityInstanceContext
    System.Web.Http.OData.EntityInstanceContext<TEntityType>

Syntax

public class EntityInstanceContext
public ref class EntityInstanceContext 
type EntityInstanceContext = class end
Public Class EntityInstanceContext

Constructors

Name Description
System_CAPS_pubmethod EntityInstanceContext()

Initializes a new instance of the EntityInstanceContext class.

System_CAPS_pubmethod EntityInstanceContext(ODataSerializerContext, IEdmEntityTypeReference, Object)

Initializes a new instance of the EntityInstanceContext class.

Properties

Name Description
System_CAPS_pubproperty EdmModel

Gets or sets the IEdmModel to which this instance belogs.

System_CAPS_pubproperty EdmObject

Gets or sets the IEdmEntityObject backing this instance.

System_CAPS_pubproperty EntityInstance

Gets or sets the value of this entity instance.

System_CAPS_pubproperty EntitySet

Gets or sets the IEdmEntitySet to which this instance belongs.

System_CAPS_pubproperty EntityType

Gets or sets the IEdmEntityType of this entity instance.

System_CAPS_pubproperty Request

Gets or sets the HTTP request that caused this instance to be generated.

System_CAPS_pubproperty SerializerContext

Gets or sets the ODataSerializerContext.

System_CAPS_pubproperty SkipExpensiveAvailabilityChecks

Gets or sets a value indicating whether ActionAvailabilityChecks should be performed or not.

System_CAPS_pubproperty Url

Gets or sets a UrlHelper that may be used to generate links while serializing this entity instance.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Extension Methods

Name Description
System_CAPS_pubmethod GenerateActionLink(IEdmFunctionBase)

Generates an action link following the OData URL conventions for the action action and bound to the entity represented by entityContext.(Defined by LinkGenerationHelpers.)

System_CAPS_pubmethod GenerateNavigationPropertyLink(IEdmNavigationProperty, Boolean)

Generates a navigation link following the OData URL conventions for the entity represented by entityContext and the given navigation property.(Defined by LinkGenerationHelpers.)

System_CAPS_pubmethod GenerateSelfLink(Boolean)

Generates a self link following the OData URL conventions for the entity represented by entityContext.(Defined by LinkGenerationHelpers.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

System.Web.Http.OData Namespace

Return to top