語言

CSharpMigrationsGenerator.GenerateSnapshot 方法

定義

多載

名稱 Description
GenerateSnapshot(String, Type, String, IModel)

產生模型快照程式碼。

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

產生模型快照程式碼。

GenerateSnapshot(String, Type, String, IModel)

來源:
CSharpMigrationsGenerator.cs
來源:
CSharpMigrationsGenerator.cs
來源:
CSharpMigrationsGenerator.cs
來源:
CSharpMigrationsGenerator.cs
來源:
CSharpMigrationsGenerator.cs
來源:
CSharpMigrationsGenerator.cs
來源:
CSharpMigrationsGenerator.cs
來源:
CSharpMigrationsGenerator.cs
來源:
CSharpMigrationsGenerator.cs
來源:
CSharpMigrationsGenerator.cs

產生模型快照程式碼。

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

參數

modelSnapshotNamespace
String

模型快照的命名空間。

contextType
Type

模型快照的 DbContext 類型。

modelSnapshotName
String

模型快照的名字。

model
IModel

模型。

傳回

模型快照程式碼。

適用於

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

來源:
CSharpMigrationsGenerator.cs

產生模型快照程式碼。

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

參數

modelSnapshotNamespace
String

模型快照的命名空間。

contextType
Type

模型快照的 DbContext 類型。

modelSnapshotName
String

模型快照的名字。

model
IModel

模型。

latestMigrationId
String

這是套用到模型的最新遷移ID。

傳回

模型快照程式碼。

適用於