ModelCacheKey Class

Definition

A key that uniquely identifies the model for a given context. This is used to store and lookup a cached model for a given context. This default implementation uses the context type as they key, thus assuming that all contexts of a given type have the same model.

public class ModelCacheKey
type ModelCacheKey = class
Public Class ModelCacheKey
Inheritance
ModelCacheKey

Remarks

See EF Core model caching for more information and examples.

Constructors

ModelCacheKey(DbContext, Boolean)

Initializes a new instance of the ModelCacheKey class.

ModelCacheKey(DbContext)

Initializes a new instance of the ModelCacheKey class.

Methods

Equals(ModelCacheKey)

Determines if this key is equivalent to a given key (i.e. if they are for the same context type).

Equals(Object)

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

GetHashCode()

Gets the hash code for the key.

Applies to