Share via


ICoreSingletonOptions Interface

Definition

Options set at the IServiceProvider singleton level to control core options.

public interface ICoreSingletonOptions : Microsoft.EntityFrameworkCore.Infrastructure.ISingletonOptions
type ICoreSingletonOptions = interface
    interface ISingletonOptions
Public Interface ICoreSingletonOptions
Implements ISingletonOptions
Implements

Remarks

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

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

Properties

AreDetailedErrorsEnabled

Reflects the option set by EnableDetailedErrors(Boolean).

AreThreadSafetyChecksEnabled

Reflects the option set by EnableThreadSafetyChecks(Boolean).

RootApplicationServiceProvider

The root service provider for the application, if available. />.

Methods

Initialize(IDbContextOptions)

Initializes the singleton options from the given IDbContextOptions.

(Inherited from ISingletonOptions)
Validate(IDbContextOptions)

Validates that the options in given IDbContextOptions have not changed when compared to the options already set here, and throws if they have.

(Inherited from ISingletonOptions)

Applies to