private void TraceExecutedCommand(object sender, DbEventArgs args) { DbCommand command = args.Command; Trace.WriteLine(command.CommandText); Trace.WriteLine(command.CommandTimeout); }
public void onPost(object source, DbEventArgs e) { var eventModel = new EventModel() { MethodUsed = e.EventDetails.ToString(), UserId = "1" }; _mongoDb.Post <EventModel>(eventModel); System.Console.WriteLine(e.EventDetails); }
private void ModifyCommandTimeout(object sender, DbEventArgs args) { DbCommand command = args.Command; command.CommandTimeout = 1000; }