IMigrationsModelDiffer.GetDifferences Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetDifferences(IModel, IModel) |
Finds the differences between two models. |
GetDifferences(IRelationalModel, IRelationalModel) |
Finds the differences between two models. |
GetDifferences(IModel, IModel)
Finds the differences between two models.
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)
Parameters
- source
- IModel
The model as it was before it was possibly modified.
- target
- IModel
The model as it is now.
Returns
A list of the operations that need to applied to the database to migrate it from mapping to the source model so that is now mapping to the target model.
Applies to
GetDifferences(IRelationalModel, IRelationalModel)
- Source:
- IMigrationsModelDiffer.cs
- Source:
- IMigrationsModelDiffer.cs
- Source:
- IMigrationsModelDiffer.cs
Finds the differences between two models.
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)
Parameters
- source
- IRelationalModel
The model as it was before it was possibly modified.
- target
- IRelationalModel
The model as it is now.
Returns
A list of the operations that need to applied to the database to migrate it from mapping to the source model so that is now mapping to the target model.
Applies to
Entity Framework