Ejemplo n.º 1
0
 public override void Open()
 {
     using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, "Open", dur)))
     {
         connection.Open();
     }
 }
Ejemplo n.º 2
0
 public object ExecuteScalar()
 {
     using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, "ExecuteScalar", dur)))
     {
         return(command.ExecuteScalar());
     }
 }
Ejemplo n.º 3
0
 protected override System.Data.Common.DbTransaction BeginDbTransaction(IsolationLevel isolationLevel)
 {
     using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, "BeginTransaction", dur)))
     {
         return(new DbTransactionProxy(connection.BeginTransaction(), context));
     }
 }
Ejemplo n.º 4
0
 public IDataReader ExecuteReader(CommandBehavior behavior)
 {
     using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, string.Format("ExecuteReader({0})", behavior), dur)))
     {
         return(command.ExecuteReader(behavior));
     }
 }
Ejemplo n.º 5
0
 public IDataReader ExecuteReader()
 {
     using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, "ExecuteReader", dur)))
     {
         return(command.ExecuteReader());
     }
 }
Ejemplo n.º 6
0
 public override object ExecuteScalar()
 {
     using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, "ExecuteScalar", dur, DbConnectionProxy.GetThreadId())))
     {
         return(command.ExecuteScalar());
     }
 }
Ejemplo n.º 7
0
 public int ExecuteNonQuery()
 {
     using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, "ExecuteNonQuery", dur)))
     {
         return(command.ExecuteNonQuery());
     }
 }
Ejemplo n.º 8
0
 protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior)
 {
     using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, string.Format("ExecuteReader({0})", behavior), dur, DbConnectionProxy.GetThreadId())))
     {
         return(command.ExecuteReader(behavior));
     }
 }
 public void Rollback()
 {
     using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, "Rollback", dur)))
     {
         transaction.Rollback();
     }
 }
 public void Commit()
 {
     using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, "Commit", dur)))
     {
         transaction.Commit();
     }
 }
Ejemplo n.º 11
0
 public IDbTransaction BeginTransaction()
 {
     using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, "BeginTransaction", dur)))
     {
         return(new DbTransactionProxy(connection.BeginTransaction(), context));
     }
 }
Ejemplo n.º 12
0
 public IDbTransaction BeginTransaction(IsolationLevel il)
 {
     using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, String.Format("BeginTransaction({0})", il), dur)))
     {
         return(new DbTransactionProxy(connection.BeginTransaction(il), context));
     }
 }
Ejemplo n.º 13
0
 public void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             using (ExecuteHelper.Begin(dur => context.FireExecuteEvent(this, "Dispose", dur)))
             {
                 connection.Dispose();
             }
         }
         disposed = true;
     }
 }
Ejemplo n.º 14
0
 protected override void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             var threadId = GetThreadId();
             using (ExecuteHelper.Begin(dur => context.FireExecuteEvent("Dispose", dur, threadId)))
             {
                 if (dbCommandProxy != null)
                 {
                     dbCommandProxy.Dispose();
                 }
                 connection.Dispose();
             }
         }
         disposed = true;
     }
 }