Is there an AfterExecutingGetDataReader or something similar?

Is there something like AfterExecutingGetDataReader which accompanies BeforeExecutingGetDataReader which could be used to log duration and possibly success/error?

For non-LINQ calls I have my logging in GetData but for linq calls it would be nice to have an After call (or an alternative way of achieving the same goal)

Hi,

in case of LinqLocalDataAdapter, you can just put request into try/catch/finally section and get exceptions and duration of call

I like to have a framework for that without duplicating lots of code

I’ll take your approach but I think an event has value

Hi,

as a temporary workaround, you can create a descendant of LinqLocalDataAdapter and override FetchData like

method MyLinqLocalDataAdapter.FetchData(requests: array of TableRequestInfo; names: array of String; fillMethod: Action<Int32, array of Int32, IDataReader>);
begin
  try
    inherited;
  except
     ...
  finally
    if assigned(AfterExecutingGetDataReader) then AfterExecutingGetDataReader(...);
  end;
end;

This looks like a great solution

With 2 override classes (local & remote) I can achieve my goal

Thanks