ISingletonOptions Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Implemented by any class that represents options that can only be set at the IServiceProvider singleton level.
public interface ISingletonOptions
type ISingletonOptions = interface
Public Interface ISingletonOptions
- Derived
Remarks
The service lifetime is Singleton and multiple registrations are allowed. This means a single instance of each service 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.
Methods
Initialize(IDbContextOptions) |
Initializes the singleton options from the given IDbContextOptions. |
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. |
Applies to
Entity Framework