Share via


EntityInstanceContext<TEntityType> Class

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

Inheritance Hierarchy

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

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

Syntax

'Declaration
Public Class EntityInstanceContext(Of TEntityType) _
    Inherits EntityInstanceContext
'Usage
Dim instance As EntityInstanceContext(Of TEntityType)
public class EntityInstanceContext<TEntityType> : EntityInstanceContext
generic<typename TEntityType>
public ref class EntityInstanceContext : public EntityInstanceContext
type EntityInstanceContext<'TEntityType> =  
    class 
        inherit EntityInstanceContext 
    end
JScript does not support generic types and methods.

Type Parameters

  • TEntityType
    The entity type.

The EntityInstanceContext<TEntityType> type exposes the following members.

Constructors

  Name Description
Public method EntityInstanceContext<TEntityType> Initializes a new instance of the EntityInstanceContext<TEntityType> class.

Top

Properties

  Name Description
Public property EdmModel Gets or sets the IEdmModel to which this instance belongs. (Inherited from EntityInstanceContext.)
Public property EdmObject Gets or sets the entity object for this instance. (Inherited from EntityInstanceContext.)
Public property EntityInstance Obsolete. Gets or sets the entity instance.
Public property EntitySet Gets or sets the IEdmEntitySet to which this instance belongs. (Inherited from EntityInstanceContext.)
Public property EntityType Gets or sets the IEdmEntityType of this entity instance. (Inherited from EntityInstanceContext.)
Public property Request Gets or sets the HTTP request that caused this instance to be generated. (Inherited from EntityInstanceContext.)
Public property SerializerContext Gets or sets the serializer context. (Inherited from EntityInstanceContext.)
Public property SkipExpensiveAvailabilityChecks Gets or sets a value indicating whether ActionAvailabilityChecks should be performed or not. (Inherited from EntityInstanceContext.)
Public property Url Gets or sets a UrlHelper that may be used to generate links while serializing this entity instance. (Inherited from EntityInstanceContext.)

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Extension Methods

  Name Description
Public Extension Method GenerateActionLink Generates an action link following the OData URL conventions for the action and bound to the entity represented by entityContext. (Defined by LinkGenerationHelpers.)
Public Extension Method GenerateNavigationPropertyLink Generates a navigation link following the OData URL conventions for the entity represented by entityContext and the given navigation property. (Defined by LinkGenerationHelpers.)
Public Extension Method GenerateSelfLink Generates a self link following the OData URL conventions for the entity represented by entityContext. (Defined by LinkGenerationHelpers.)

Top

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

Reference

System.Web.Http.OData Namespace