Example #1
0
        private void TraceExecutedCommand(object sender, DbEventArgs args)
        {
            DbCommand command = args.Command;

            Trace.WriteLine(command.CommandText);
            Trace.WriteLine(command.CommandTimeout);
        }
Example #2
0
        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);
        }
Example #3
0
        private void ModifyCommandTimeout(object sender, DbEventArgs args)
        {
            DbCommand command = args.Command;

            command.CommandTimeout = 1000;
        }