public static IPromise OpenBeginTransactions <T>(this IDbConnection @this, String sql, CommandType commandType, IEnumerable <T> entities, Action <T, int> progress, Action <int> committed, Action <Exception> rollbacked) { return(RSGExtensions.AsyncInvokeAsPromise(() => SqlExtensions.OpenBeginTransactions(@this, sql, commandType, entities, progress, committed, rollbacked))); }
private static IPromise <IEnumerable <T> > onOpenQuery <T>(this IDbConnection @this, string sql, CommandType commandType, Dictionary <string, object> values) where T : new() { Func <IEnumerable <T> > invoker = () => SqlExtensions.OpenQuery <T>(@this, sql, commandType, values); return(invoker.AsyncInvokeAsPromise()); }
private static IPromise <int> onExecute(this IDbConnection @this, string sql, CommandType commandType, IDictionary <string, object> values) { Func <int> invoker = () => SqlExtensions.Execute(@this, sql, commandType, values); return(invoker.AsyncInvokeAsPromise()); }
private static IPromise <IEnumerable <IEnumerable <(string name, object value)> > > onQuery(this IDbConnection @this, string sql, CommandType commandType, Dictionary <string, object> values) { Func <IEnumerable <IEnumerable <(string name, object value)> > > invoker = () => SqlExtensions.Query(@this, sql, commandType, values); return(invoker.AsyncInvokeAsPromise()); }