Struct InterceptionResult
- Namespace
- Microsoft.EntityFrameworkCore.Diagnostics
- Assembly
- Microsoft.EntityFrameworkCore.dll
Represents a result from an IInterceptor such as an ISaveChangesInterceptor to allow suppression of the normal operation being intercepted.
public readonly struct InterceptionResult
- Inherited Members
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.
public bool IsSuppressed { get; }
Property Value
Methods
Suppress()
Creates a new InterceptionResult instance indicating that execution should be suppressed.
public static InterceptionResult Suppress()