ProxiesExtensions.UseChangeTrackingProxies Method

Definition

Overloads

UseChangeTrackingProxies(DbContextOptionsBuilder, Boolean, Boolean)

Turns on the creation of change tracking proxies.

Note that this requires appropriate services to be available in the EF internal service provider. Normally this will happen automatically, but if the application is controlling the service provider, then a call to AddEntityFrameworkProxies(IServiceCollection) may be needed.

UseChangeTrackingProxies<TContext>(DbContextOptionsBuilder<TContext>, Boolean, Boolean)

Turns on the creation of change tracking proxies.

Note that this requires appropriate services to be available in the EF internal service provider. Normally this will happen automatically, but if the application is controlling the service provider, then a call to AddEntityFrameworkProxies(IServiceCollection) may be needed.

UseChangeTrackingProxies(DbContextOptionsBuilder, Boolean, Boolean)

Turns on the creation of change tracking proxies.

Note that this requires appropriate services to be available in the EF internal service provider. Normally this will happen automatically, but if the application is controlling the service provider, then a call to AddEntityFrameworkProxies(IServiceCollection) may be needed.

public static Microsoft.EntityFrameworkCore.DbContextOptionsBuilder UseChangeTrackingProxies (this Microsoft.EntityFrameworkCore.DbContextOptionsBuilder optionsBuilder, bool useChangeTrackingProxies = true, bool checkEquality = true);
static member UseChangeTrackingProxies : Microsoft.EntityFrameworkCore.DbContextOptionsBuilder * bool * bool -> Microsoft.EntityFrameworkCore.DbContextOptionsBuilder
<Extension()>
Public Function UseChangeTrackingProxies (optionsBuilder As DbContextOptionsBuilder, Optional useChangeTrackingProxies As Boolean = true, Optional checkEquality As Boolean = true) As DbContextOptionsBuilder

Parameters

optionsBuilder
DbContextOptionsBuilder

The options builder, as passed to OnConfiguring(DbContextOptionsBuilder) or exposed AddDbContext.

useChangeTrackingProxies
Boolean

true to use change tracking proxies; false to prevent their use.

checkEquality
Boolean

true if proxy change detection should check if the incoming value is equal to the current value before notifying. Defaults to true.

Returns

DbContextOptionsBuilder

The same builder to allow method calls to be chained.

Applies to

UseChangeTrackingProxies<TContext>(DbContextOptionsBuilder<TContext>, Boolean, Boolean)

Turns on the creation of change tracking proxies.

Note that this requires appropriate services to be available in the EF internal service provider. Normally this will happen automatically, but if the application is controlling the service provider, then a call to AddEntityFrameworkProxies(IServiceCollection) may be needed.

public static Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> UseChangeTrackingProxies<TContext> (this Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<TContext> optionsBuilder, bool useChangeTrackingProxies = true, bool checkEquality = true) where TContext : Microsoft.EntityFrameworkCore.DbContext;
static member UseChangeTrackingProxies : Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)> * bool * bool -> Microsoft.EntityFrameworkCore.DbContextOptionsBuilder<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)> (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)
<Extension()>
Public Function UseChangeTrackingProxies(Of TContext As DbContext) (optionsBuilder As DbContextOptionsBuilder(Of TContext), Optional useChangeTrackingProxies As Boolean = true, Optional checkEquality As Boolean = true) As DbContextOptionsBuilder(Of TContext)

Type Parameters

TContext

The DbContext type.

Parameters

optionsBuilder
DbContextOptionsBuilder<TContext>

The options builder, as passed to OnConfiguring(DbContextOptionsBuilder) or exposed AddDbContext.

useChangeTrackingProxies
Boolean

true to use change tracking proxies; false to prevent their use.

checkEquality
Boolean

true if proxy change detection should check if the incoming value is equal to the current value before notifying. Defaults to true.

Returns

DbContextOptionsBuilder<TContext>

The same builder to allow method calls to be chained.

Applies to