2

I don't know even this is a reasonable question or not, but I am wondering, is there any way to register an event on IQueryable execution so when the IQueryable runs the event gets triggered.

Problem is I am passing the IQueryable to a table object and I have no idea when the data being populated into the table but I want to do some action after my IQueryable got populated or executed.

For instance something like this:

IQueryable list = context.data.Where(....);
list.onExecutionCompleted += DoSomeAction;
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Saeed
  • 56
  • 9
  • Is your process that is inserting the data? – TheGeneral Dec 28 '18 at 07:54
  • Possible duplicate of [How to monitor SQL Server table changes by using c#?](https://stackoverflow.com/questions/5288434/how-to-monitor-sql-server-table-changes-by-using-c) – TheGeneral Dec 28 '18 at 07:55
  • No, I have Entity framework Interceptor, I want to unregister it when the query is done. – Saeed Jan 11 '19 at 22:46

0 Answers0