ModelCacheKeyFactory ModelCacheKeyFactory Class

Creates keys 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.

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

Syntax

Declaration

public class ModelCacheKeyFactory : IModelCacheKeyFactoryPublic Class ModelCacheKeyFactory
    Implements IModelCacheKeyFactory

Inheritance Hierarchy

  • System.Object
    System.Object
  • ModelCacheKeyFactory
    ModelCacheKeyFactory

Inherited Members

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

Methods summary

Gets the model cache key for a given context.

Methods

  • Create(DbContext)
    Create(DbContext)

    Gets the model cache key for a given context.

    public virtual object Create(DbContext context)Public Overridable Function Create(context As DbContext) As Object

    Parameters

    Returns

    • System.Object
      System.Object

      The created key.

Details

Assembly

Microsoft.EntityFrameworkCore.dll