SnapshotModelProcessor Class
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.
The default implementation of ISnapshotModelProcessor. Applies fix-ups to a model loaded from a Migrations snapshot so it can be used with the current version of EF Core.
public class SnapshotModelProcessor : Microsoft.EntityFrameworkCore.Migrations.ISnapshotModelProcessor
type SnapshotModelProcessor = class
interface ISnapshotModelProcessor
Public Class SnapshotModelProcessor
Implements ISnapshotModelProcessor
- Inheritance
-
SnapshotModelProcessor
- Implements
Remarks
Database providers can derive from this class and register their derived type as ISnapshotModelProcessor to apply additional provider-specific fix-ups in addition to the relational fix-ups performed by this implementation.
The service lifetime is Scoped. This means that each DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.
See Database migrations for more information and examples.
Constructors
| Name | Description |
|---|---|
| SnapshotModelProcessor(IOperationReporter, IModelRuntimeInitializer) |
Creates a new instance of SnapshotModelProcessor. |
Methods
| Name | Description |
|---|---|
| Process(IReadOnlyModel, Boolean) |
Processes the model, applying any fix-ups needed for the version of EF Core that created the snapshot. |