Table of Contents

Class EntityInstanceContext

Namespace
System.Web.Http.OData
Assembly
System.Web.Http.OData.dll

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

public class EntityInstanceContext
Inheritance
EntityInstanceContext
Derived
Inherited Members

Constructors

EntityInstanceContext()

Initializes a new instance of the EntityInstanceContext class.

public EntityInstanceContext()

EntityInstanceContext(ODataSerializerContext, IEdmEntityTypeReference, object)

Initializes a new instance of the EntityInstanceContext class.

public EntityInstanceContext(ODataSerializerContext serializerContext, IEdmEntityTypeReference entityType, object entityInstance)

Parameters

serializerContext ODataSerializerContext

The backing ODataSerializerContext.

entityType IEdmEntityTypeReference

The EDM entity type of this instance context.

entityInstance object

The object representing the instance of this context.

Properties

EdmModel

Gets or sets the Microsoft.Data.Edm.IEdmModel to which this instance belogs.

public IEdmModel EdmModel { get; set; }

Property Value

IEdmModel

EdmObject

Gets or sets the IEdmEntityObject backing this instance.

public IEdmEntityObject EdmObject { get; set; }

Property Value

IEdmEntityObject

EntityInstance

Gets or sets the value of this entity instance.

public object EntityInstance { get; set; }

Property Value

object

EntitySet

Gets or sets the Microsoft.Data.Edm.IEdmEntitySet to which this instance belongs.

public IEdmEntitySet EntitySet { get; set; }

Property Value

IEdmEntitySet

EntityType

Gets or sets the Microsoft.Data.Edm.IEdmEntityType of this entity instance.

public IEdmEntityType EntityType { get; set; }

Property Value

IEdmEntityType

Request

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

public HttpRequestMessage Request { get; set; }

Property Value

HttpRequestMessage

SerializerContext

Gets or sets the ODataSerializerContext.

public ODataSerializerContext SerializerContext { get; set; }

Property Value

ODataSerializerContext

SkipExpensiveAvailabilityChecks

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

public bool SkipExpensiveAvailabilityChecks { get; set; }

Property Value

bool

Url

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

public UrlHelper Url { get; set; }

Property Value

UrlHelper