語言

IMigrationsCodeGenerator.GenerateSnapshot 方法

定義

多載

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

產生模型快照程式碼。

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

產生模型快照程式碼。

GenerateSnapshot(String, Type, String, IModel)

來源:
IMigrationsCodeGenerator.cs
來源:
IMigrationsCodeGenerator.cs
來源:
IMigrationsCodeGenerator.cs
來源:
IMigrationsCodeGenerator.cs

產生模型快照程式碼。

public string GenerateSnapshot(string? modelSnapshotNamespace, Type contextType, string modelSnapshotName, Microsoft.EntityFrameworkCore.Metadata.IModel model);
public string GenerateSnapshot(string modelSnapshotNamespace, Type contextType, string modelSnapshotName, Microsoft.EntityFrameworkCore.Metadata.IModel model);
abstract member GenerateSnapshot : string * Type * string * Microsoft.EntityFrameworkCore.Metadata.IModel -> string
Public 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)

來源:
IMigrationsCodeGenerator.cs

產生模型快照程式碼。

public string GenerateSnapshot(string? modelSnapshotNamespace, Type contextType, string modelSnapshotName, Microsoft.EntityFrameworkCore.Metadata.IModel model, string? latestMigrationId = default);
abstract member GenerateSnapshot : string * Type * string * Microsoft.EntityFrameworkCore.Metadata.IModel * string -> string
Public 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。

傳回

模型快照程式碼。

適用於