IMaterializationInterceptor.InitializedInstance Method
Definition
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.
Called immediately after EF has set property values of an entity that has just been created.
public virtual object InitializedInstance (Microsoft.EntityFrameworkCore.Diagnostics.MaterializationInterceptionData materializationData, object entity);
abstract member InitializedInstance : Microsoft.EntityFrameworkCore.Diagnostics.MaterializationInterceptionData * obj -> obj
override this.InitializedInstance : Microsoft.EntityFrameworkCore.Diagnostics.MaterializationInterceptionData * obj -> obj
Public Overridable Function InitializedInstance (materializationData As MaterializationInterceptionData, entity As Object) As Object
Parameters
- materializationData
- MaterializationInterceptionData
Contextual information about the materialization happening.
- entity
- Object
The entity instance that has been created. This value is typically used as the return value for the implementation of this method.
Returns
The entity instance that EF will use.
An implementation of this method for any interceptor that is not attempting to change the instance used
must return the entity
value passed in.
Applies to
Entity Framework