OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>.HasChangeTrackingStrategy 方法

定义

配置 ChangeTrackingStrategy 要用于此实体类型的 。 此策略指示上下文如何检测实体类型实例的属性更改。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> HasChangeTrackingStrategy (Microsoft.EntityFrameworkCore.ChangeTrackingStrategy changeTrackingStrategy);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> HasChangeTrackingStrategy (Microsoft.EntityFrameworkCore.ChangeTrackingStrategy changeTrackingStrategy);
override this.HasChangeTrackingStrategy : Microsoft.EntityFrameworkCore.ChangeTrackingStrategy -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)>
override this.HasChangeTrackingStrategy : Microsoft.EntityFrameworkCore.ChangeTrackingStrategy -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'OwnerEntity, 'DependentEntity (requires 'OwnerEntity : null and 'DependentEntity : null)>
Public Overridable Function HasChangeTrackingStrategy (changeTrackingStrategy As ChangeTrackingStrategy) As OwnedNavigationBuilder(Of TEntity, TDependentEntity)
Public Overridable Function HasChangeTrackingStrategy (changeTrackingStrategy As ChangeTrackingStrategy) As OwnedNavigationBuilder(Of TOwnerEntity, TDependentEntity)

参数

changeTrackingStrategy
ChangeTrackingStrategy

要使用的更改跟踪策略。

返回

OwnedNavigationBuilder<TEntity,TDependentEntity>

同一生成器实例,以便可以链接多个配置调用。

适用于