DbContextOptionsExtensionInfo Class

Definition

Information/metadata for an IDbContextOptionsExtension.

public abstract class DbContextOptionsExtensionInfo
type DbContextOptionsExtensionInfo = class
Public MustInherit Class DbContextOptionsExtensionInfo
Inheritance
DbContextOptionsExtensionInfo
Derived

Remarks

See Implementation of database providers and extensions for more information and examples.

Constructors

DbContextOptionsExtensionInfo(IDbContextOptionsExtension)

Creates a new DbContextOptionsExtensionInfo instance containing info/metadata for the given extension.

Properties

Extension

The extension for which this instance contains metadata.

IsDatabaseProvider

true if the extension is a database provider; false otherwise.

LogFragment

A message fragment for logging typically containing information about any useful non-default options that have been configured.

Methods

GetServiceProviderHashCode()

Returns a hash code created from any options that would cause a new IServiceProvider to be needed. For example, if the options affect a singleton service. However most extensions do not have any such options and should return zero.

PopulateDebugInfo(IDictionary<String,String>)

Populates a dictionary of information that may change between uses of the extension such that it can be compared to a previous configuration for this option and differences can be logged. The dictionary key should be prefixed by the extension name. For example, "SqlServer:".

ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo)

Returns a value indicating whether all of the options used in GetServiceProviderHashCode() are the same as in the given extension.

Applies to