Table of Contents

Class EntityServiceInterceptor

Namespace
LinqToDB.Interceptors
Assembly
linq2db.dll
public abstract class EntityServiceInterceptor : IEntityServiceInterceptor, IInterceptor
Inheritance
EntityServiceInterceptor
Implements
Extension Methods

Methods

EntityCreated(EntityCreatedEventData, object)

Event, triggered when a new entity is created during query materialization. Not triggered for explicitly constructed objects. In code below event could be triggered only for first query:

// r created by linq2db implicitly

 from r in db.table select r;

 // Entity constructor call specified explicitly by user (projection)

 from r in db.table select new Entity() { field = r.field };
.
public virtual object EntityCreated(EntityCreatedEventData eventData, object entity)

Parameters

eventData EntityCreatedEventData

Additional data for event.

entity object

Materialized entity instance.

Returns

object

Returns entity instance.