ConventionEntityTypeExtensions.SetChangeTrackingStrategy Method

Definition

Sets the change tracking strategy to use for this entity type. This strategy indicates how the context detects changes to properties for an instance of the entity type.

public static void SetChangeTrackingStrategy (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, Microsoft.EntityFrameworkCore.ChangeTrackingStrategy? changeTrackingStrategy, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.ChangeTrackingStrategy? SetChangeTrackingStrategy (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, Microsoft.EntityFrameworkCore.ChangeTrackingStrategy? changeTrackingStrategy, bool fromDataAnnotation = false);
static member SetChangeTrackingStrategy : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * Nullable<Microsoft.EntityFrameworkCore.ChangeTrackingStrategy> * bool -> unit
static member SetChangeTrackingStrategy : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * Nullable<Microsoft.EntityFrameworkCore.ChangeTrackingStrategy> * bool -> Nullable<Microsoft.EntityFrameworkCore.ChangeTrackingStrategy>
<Extension()>
Public Sub SetChangeTrackingStrategy (entityType As IConventionEntityType, changeTrackingStrategy As Nullable(Of ChangeTrackingStrategy), Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetChangeTrackingStrategy (entityType As IConventionEntityType, changeTrackingStrategy As Nullable(Of ChangeTrackingStrategy), Optional fromDataAnnotation As Boolean = false) As Nullable(Of ChangeTrackingStrategy)

Parameters

entityType
IConventionEntityType

The entity type.

changeTrackingStrategy
Nullable<ChangeTrackingStrategy>

The strategy to use.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured value.

Applies to