Note

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

Access to this page requires authorization. You can try .

IMaterializationInterceptor Interface

Definition

Namespace:
Microsoft.EntityFrameworkCore.Diagnostics
Assembly:
Microsoft.EntityFrameworkCore.dll
Package:
Microsoft.EntityFrameworkCore v10.0.0
Package:
Microsoft.EntityFrameworkCore v7.0.0
Package:
Microsoft.EntityFrameworkCore v8.0.0
Package:
Microsoft.EntityFrameworkCore v9.0.0
Source:
IMaterializationInterceptor.cs
Source:
IMaterializationInterceptor.cs
Source:
IMaterializationInterceptor.cs
Source:
IMaterializationInterceptor.cs

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.

A ISingletonInterceptor used to intercept the various parts of object creation and initialization when Entity Framework is creating an object, typically from data returned by a query.

public interface IMaterializationInterceptor : Microsoft.EntityFrameworkCore.Diagnostics.ISingletonInterceptor
type IMaterializationInterceptor = interface
 interface ISingletonInterceptor
 interface IInterceptor
Public Interface IMaterializationInterceptor
Implements ISingletonInterceptor
Implements

Remarks

See EF Core interceptors for more information and examples.

Methods

Name Description
CreatedInstance(MaterializationInterceptionData, Object)

Called immediately after EF has created an instance of an entity. That is, after the constructor has been called, but before any properties values not set by the constructor have been set.

CreatingInstance(MaterializationInterceptionData, InterceptionResult<Object>)

Called immediately before EF is going to create an instance of an entity. That is, before the constructor has been called.

InitializedInstance(MaterializationInterceptionData, Object)

Called immediately after EF has set property values of an entity that has just been created.

InitializingInstance(MaterializationInterceptionData, Object, InterceptionResult)

Called immediately before EF is going to set property values of an entity that has just been created. Note that property values set by the constructor will already have been set.

Applies to


Feedback

Was this page helpful?