共用方式為


IMigrationsModelDiffer.GetDifferences 方法

定義

多載

GetDifferences(IModel, IModel)

尋找兩個模型之間的差異。

GetDifferences(IRelationalModel, IRelationalModel)

尋找兩個模型之間的差異。

GetDifferences(IModel, IModel)

尋找兩個模型之間的差異。

public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> GetDifferences (Microsoft.EntityFrameworkCore.Metadata.IModel source, Microsoft.EntityFrameworkCore.Metadata.IModel target);
abstract member GetDifferences : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Metadata.IModel -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation>
Public Function GetDifferences (source As IModel, target As IModel) As IReadOnlyList(Of MigrationOperation)

參數

source
IModel

模型在可能修改之前一樣。

target
IModel

模型現在已如此。

傳回

需要套用至資料庫的作業清單,以便將它從對應遷移至來源模型,以便現在對應至目標模型。

適用於

GetDifferences(IRelationalModel, IRelationalModel)

尋找兩個模型之間的差異。

public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> GetDifferences (Microsoft.EntityFrameworkCore.Metadata.IRelationalModel source, Microsoft.EntityFrameworkCore.Metadata.IRelationalModel target);
public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> GetDifferences (Microsoft.EntityFrameworkCore.Metadata.IRelationalModel? source, Microsoft.EntityFrameworkCore.Metadata.IRelationalModel? target);
abstract member GetDifferences : Microsoft.EntityFrameworkCore.Metadata.IRelationalModel * Microsoft.EntityFrameworkCore.Metadata.IRelationalModel -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation>
Public Function GetDifferences (source As IRelationalModel, target As IRelationalModel) As IReadOnlyList(Of MigrationOperation)

參數

source
IRelationalModel

模型在可能修改之前一樣。

target
IRelationalModel

模型現在已如此。

傳回

需要套用至資料庫的作業清單,以便將它從對應遷移至來源模型,以便現在對應至目標模型。

適用於