InterceptionResult Struct

Definition

Represents a result from an IInterceptor such as an ISaveChangesInterceptor to allow suppression of the normal operation being intercepted.

[System.Runtime.CompilerServices.IsReadOnly]
public readonly struct InterceptionResult
public readonly struct InterceptionResult
[<System.Runtime.CompilerServices.IsReadOnly>]
type InterceptionResult = struct
type InterceptionResult = struct
Public Structure InterceptionResult
Inheritance
InterceptionResult
Attributes

Remarks

A value of this type is passed to all interceptor methods that are called before the operation being intercepted is executed. Typically the interceptor should return the value passed in. However, creating a result with Suppress() causes the operation being intercepted to be suppressed; that is, the operation is not executed.

See EF Core interceptors for more information and examples.

Properties

IsSuppressed

If true, then interception is suppressed.

Methods

Suppress()

Creates a new InterceptionResult instance indicating that execution should be suppressed.

Applies to