Пример #1
0
 public static void InvokeScript(this IPhysicalConnection conn, Action <ISqlDumper> script, string dbname)
 {
     conn.Invoke(
         (Action) delegate()
     {
         conn.SystemConnection.SafeChangeDatabase(dbname);
         conn.RunScript(script);
     });
 }
Пример #2
0
 public void SaveChanges(BedTable table, ISaveDataProgress progress)
 {
     using (DbTransaction tran = m_conn.SystemConnection.BeginTransaction())
     {
         try
         {
             m_conn.RunScript(dmp => SaveChanges(table, dmp, progress), tran, null);
             tran.Commit();
         }
         catch
         {
             tran.Rollback();
             throw;
         }
     }
 }
Пример #3
0
 public static void RunScript(this IPhysicalConnection conn, Action <ISqlDumper> script)
 {
     conn.RunScript(script, null, null);
 }