Language

CSharpMigrationsGenerator.GenerateSnapshot Method

Definition

Overloads

Name Description
GenerateSnapshot(String, Type, String, IModel)

Generates the model snapshot code.

GenerateSnapshot(String, Type, String, IModel, String)

Generates the model snapshot code.

GenerateSnapshot(String, Type, String, IModel)

Source:
CSharpMigrationsGenerator.cs
Source:
CSharpMigrationsGenerator.cs
Source:
CSharpMigrationsGenerator.cs
Source:
CSharpMigrationsGenerator.cs
Source:
CSharpMigrationsGenerator.cs
Source:
CSharpMigrationsGenerator.cs
Source:
CSharpMigrationsGenerator.cs
Source:
CSharpMigrationsGenerator.cs
Source:
CSharpMigrationsGenerator.cs
Source:
CSharpMigrationsGenerator.cs

Generates the model snapshot code.

public override string GenerateSnapshot(string modelSnapshotNamespace, Type contextType, string modelSnapshotName, Microsoft.EntityFrameworkCore.Metadata.IModel model);
public override string GenerateSnapshot(string? modelSnapshotNamespace, Type contextType, string modelSnapshotName, Microsoft.EntityFrameworkCore.Metadata.IModel model);
override this.GenerateSnapshot : string * Type * string * Microsoft.EntityFrameworkCore.Metadata.IModel -> string
Public Overrides Function GenerateSnapshot (modelSnapshotNamespace As String, contextType As Type, modelSnapshotName As String, model As IModel) As String

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

GenerateSnapshot(String, Type, String, IModel, String)

Source:
CSharpMigrationsGenerator.cs

Generates the model snapshot code.

public override string GenerateSnapshot(string? modelSnapshotNamespace, Type contextType, string modelSnapshotName, Microsoft.EntityFrameworkCore.Metadata.IModel model, string? latestMigrationId = default);
override this.GenerateSnapshot : string * Type * string * Microsoft.EntityFrameworkCore.Metadata.IModel * string -> string
Public Overrides Function GenerateSnapshot (modelSnapshotNamespace As String, contextType As Type, modelSnapshotName As String, model As IModel, Optional latestMigrationId As String = Nothing) As String

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.

latestMigrationId
String

The ID of the latest migration that has been applied to the model.

Returns

The model snapshot code.

Applies to