Table of Contents

Interface IEntityServiceInterceptor

Namespace
LinqToDB.Interceptors
Assembly
linq2db.dll
public interface IEntityServiceInterceptor : IInterceptor
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 };
.
object EntityCreated(EntityCreatedEventData eventData, object entity)

Parameters

eventData EntityCreatedEventData

Additional data for event.

entity object

Materialized entity instance.

Returns

object

Returns entity instance.