다음을 통해 공유


ModelBuilder.HasChangeTrackingStrategy Method

Definition

Overloads

HasChangeTrackingStrategy(ChangeTrackingStrategy)

Configures the default ChangeTrackingStrategy to be used for this model. This strategy indicates how the context detects changes to properties for an instance of an entity type.

HasChangeTrackingStrategy(ChangeTrackingStrategy)

Configures the default ChangeTrackingStrategy to be used for this model. This strategy indicates how the context detects changes to properties for an instance of an entity type.

HasChangeTrackingStrategy(ChangeTrackingStrategy)

Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs

Configures the default ChangeTrackingStrategy to be used for this model. This strategy indicates how the context detects changes to properties for an instance of an entity type.

public virtual Microsoft.EntityFrameworkCore.ModelBuilder HasChangeTrackingStrategy (Microsoft.EntityFrameworkCore.ChangeTrackingStrategy changeTrackingStrategy);
abstract member HasChangeTrackingStrategy : Microsoft.EntityFrameworkCore.ChangeTrackingStrategy -> Microsoft.EntityFrameworkCore.ModelBuilder
override this.HasChangeTrackingStrategy : Microsoft.EntityFrameworkCore.ChangeTrackingStrategy -> Microsoft.EntityFrameworkCore.ModelBuilder
Public Overridable Function HasChangeTrackingStrategy (changeTrackingStrategy As ChangeTrackingStrategy) As ModelBuilder

Parameters

changeTrackingStrategy
ChangeTrackingStrategy

The change tracking strategy to be used.

Returns

The same ModelBuilder instance so that additional configuration calls can be chained.

Remarks

See Change detection and notifications for more information and examples.

Applies to

HasChangeTrackingStrategy(ChangeTrackingStrategy)

Configures the default ChangeTrackingStrategy to be used for this model. This strategy indicates how the context detects changes to properties for an instance of an entity type.

public virtual Microsoft.EntityFrameworkCore.ModelBuilder HasChangeTrackingStrategy (Microsoft.EntityFrameworkCore.Metadata.ChangeTrackingStrategy changeTrackingStrategy);
abstract member HasChangeTrackingStrategy : Microsoft.EntityFrameworkCore.Metadata.ChangeTrackingStrategy -> Microsoft.EntityFrameworkCore.ModelBuilder
override this.HasChangeTrackingStrategy : Microsoft.EntityFrameworkCore.Metadata.ChangeTrackingStrategy -> Microsoft.EntityFrameworkCore.ModelBuilder
Public Overridable Function HasChangeTrackingStrategy (changeTrackingStrategy As ChangeTrackingStrategy) As ModelBuilder

Parameters

changeTrackingStrategy
ChangeTrackingStrategy

The change tracking strategy to be used.

Returns

The same ModelBuilder instance so that additional configuration calls can be chained.

Applies to