How do I save Trace messages to a database?

TrueView provides an OnTrace event that you can hook up to:

using Evolving.TrueView;

static class Program
{
  /// <summary>
  /// The main entry point for the application.
  /// </summary>
  [STAThread]
  static void Main()
  {
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);

    MyApplication.OnTrace += new MyApplication.OnTraceEventHandler(MyApplication_OnTrace);
    Application.Run(MyApplication.Workbench);
  }

  static void MyApplication_OnTrace(object sender, Evolving.TrueView.Auditing.TraceMessage traceMessage)
  {
    // Execute your code here
  }
}

Search Knowledge Base

Have a question? Ask here.

Your name * Your email address * Your question/comment*