Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ProxiesExtensions.UseChangeTrackingProxies Method

Definition

Namespace:
Microsoft.EntityFrameworkCore
Assembly:
Microsoft.EntityFrameworkCore.Proxies.dll
Package:
Microsoft.EntityFrameworkCore.Proxies v10.0.0
Package:
Microsoft.EntityFrameworkCore.Proxies v5.0.0
Package:
Microsoft.EntityFrameworkCore.Proxies v6.0.0
Package:
Microsoft.EntityFrameworkCore.Proxies v7.0.0
Package:
Microsoft.EntityFrameworkCore.Proxies v8.0.0
Package:
Microsoft.EntityFrameworkCore.Proxies v9.0.0

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

Name Description
UseChangeTrackingProxies(DbContextOptionsBuilder, Boolean, Boolean)

Turns on the creation of change tracking proxies.

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

Turns on the creation of change tracking proxies.

UseChangeTrackingProxies(DbContextOptionsBuilder, Boolean, Boolean)

Source:
ProxiesExtensions.cs
Source:
ProxiesExtensions.cs
Source:
ProxiesExtensions.cs
Source:
ProxiesExtensions.cs
Source:
ProxiesExtensions.cs
Source:
ProxiesExtensions.cs

Turns on the creation of change tracking proxies.

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

The same builder to allow method calls to be chained.

Remarks

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.

See Notification entities for more information and examples.

Applies to

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

Source:
ProxiesExtensions.cs
Source:
ProxiesExtensions.cs
Source:
ProxiesExtensions.cs
Source:
ProxiesExtensions.cs
Source:
ProxiesExtensions.cs
Source:
ProxiesExtensions.cs

Turns on the creation of change tracking proxies.

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

The same builder to allow method calls to be chained.

Remarks

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.

See Notification entities for more information and examples.

Applies to


Feedback

Was this page helpful?