CSharpMigrationsGenerator.GenerateSnapshot Method

Definition

Generates the model snapshot code.

C#
public override string GenerateSnapshot (string modelSnapshotNamespace, Type contextType, string modelSnapshotName, Microsoft.EntityFrameworkCore.Metadata.IModel model);
C#
public override string GenerateSnapshot (string? modelSnapshotNamespace, Type contextType, string modelSnapshotName, Microsoft.EntityFrameworkCore.Metadata.IModel model);

Parameters

modelSnapshotNamespace
String

The model snapshot's namespace.

contextType
Type

The model snapshot's DbContext type.

modelSnapshotName
String

The model snapshot's name.

model
IModel

The model.

Returns

The model snapshot code.

Applies to

Product Versions
Entity Framework Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0