ConventionModelExtensions.SetChangeTrackingStrategy Método

Definición

Establece la estrategia de seguimiento de cambios predeterminada que se va a usar para las entidades del modelo. Esta estrategia indica cómo el contexto detecta los cambios en las propiedades de una instancia de un tipo de entidad.

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

Parámetros

model
IConventionModel

Modelo para el que se va a establecer la estrategia de seguimiento de cambios predeterminada.

changeTrackingStrategy
Nullable<ChangeTrackingStrategy>

Estrategia que se va a usar.

fromDataAnnotation
Boolean

Indica si la configuración se especificó mediante una anotación de datos.

Devoluciones

El valor configurado.

Se aplica a