CompiledQueryCacheKeyGenerator.CompiledQueryCacheKey CompiledQueryCacheKeyGenerator.CompiledQueryCacheKey Struct

Definition

A key that uniquely identifies a query. This is used to store and lookup compiled versions of a query in a cache.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

protected struct CompiledQueryCacheKey
Protected Structure CompiledQueryCacheKey

Constructors

CompiledQueryCacheKey(Expression, IModel, QueryTrackingBehavior, Boolean) CompiledQueryCacheKey(Expression, IModel, QueryTrackingBehavior, Boolean)

Initializes a new instance of the CompiledQueryCacheKeyGenerator.CompiledQueryCacheKey class.

public CompiledQueryCacheKey(Expression query, IModel model, QueryTrackingBehavior queryTrackingBehavior, bool async)
Public Sub New(query As Expression, model As IModel, queryTrackingBehavior As QueryTrackingBehavior, async As Boolean)
Parameters
query
System.Linq.Expressions.Expression System.Linq.Expressions.Expression

The query to generate the key for.

model
IModel IModel

The model that queries is written against.

queryTrackingBehavior
QueryTrackingBehavior QueryTrackingBehavior

The tracking behavior for results of the query.

async
System.Boolean System.Boolean

A value indicating whether the query will be executed asynchronously.

Methods

Equals(Object) Equals(Object)

Determines if this key is equivalent to a given object (i.e. if they are keys for the same query).

public override bool Equals(object obj)
Public Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
System.Object System.Object

The object to compare this key to.

Returns
System.Boolean System.Boolean

True if the object is a CompiledQueryCacheKeyGenerator.CompiledQueryCacheKey and is for the same query, otherwise false.

Overrides
System.ValueType.Equals(System.Object)System.ValueType.Equals(System.Object)

Equals(Object, Object) Equals(Object, Object)

Inherited from System.Object

GetHashCode() GetHashCode()

Gets the hash code for the key.

public override int GetHashCode()
Public Overrides Function GetHashCode As Integer
Returns
System.Int32 System.Int32

The hash code for the key.

Overrides
System.ValueType.GetHashCode()System.ValueType.GetHashCode()

GetType() GetType()

Inherited from System.Object

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from System.Object

ToString() ToString()

Inherited from System.ValueType