CompiledQueryCacheKeyGenerator.CompiledQueryCacheKey CompiledQueryCacheKeyGenerator.CompiledQueryCacheKey Struct

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.

Syntax

Declaration

protected struct CompiledQueryCacheKeyProtected Structure CompiledQueryCacheKey

Inherited Members

ToString(),
ToString(),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetType()
GetType()

Constructors summary

Initializes a new instance of the CompiledQueryCacheKeyGenerator.CompiledQueryCacheKey class.

Methods summary

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

Gets the hash code for the key.

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

      The model that queries is written against.

    • 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

  • 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.

Details

Assembly

Microsoft.EntityFrameworkCore.dll