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)

Source:
IMigrationsModelDiffer.cs
Source:
IMigrationsModelDiffer.cs
Source:
IMigrationsModelDiffer.cs

查找两个模型之间的差异。

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

现在的模型。

返回

需要应用于数据库的操作列表,以便将其从映射迁移到源模型,以便现在映射到目标模型。

适用于