Devart.Data.Linq.Monitoring - Logging the SQL Parameters
Posted: Tue 18 Oct 2011 15:01
I've set up an event handler in the OnCreated event of my datacontext. The event handler looks like this:
That works fine to log the sql statement. However, I can't figure out how to log the input/output parameters. The dbMonitor tool is able to log the parameters so I'm guessing there is a way to do it. Has anybody figure out how to do this?
Code: Select all
static void OnEvent(object sender, MonitorEventArgs e)
{
if (e.TracePoint == MonitorTracePoint.BeforeEvent && (e.EventType == MonitorEventType.Execute || e.EventType == MonitorEventType.Error))
{
Common.Log.Verbose(string.Format("Description: " + e.Description));
Common.Log.Verbose(string.Format("Extra info: " + e.ExtraInfo));
}
}