public static void InvokeScript(this IPhysicalConnection conn, Action <ISqlDumper> script, string dbname) { conn.Invoke( (Action) delegate() { conn.SystemConnection.SafeChangeDatabase(dbname); conn.RunScript(script); }); }
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; } } }
public static void RunScript(this IPhysicalConnection conn, Action <ISqlDumper> script) { conn.RunScript(script, null, null); }