public ISqlResultPromise <T> Add <T>(ISqlCommand <T> command) { Argument.NotNull(command, nameof(command)); var promise = new SqlResultPromise <T>(); AddExecutor((c, i) => { var result = new SqlCommandStrategy(_interactionFactory).Execute(command, c, i); promise.SetValue(result); }); return(promise); }
public ISqlResultPromise <T> Add <T>(ISqlQuery query, IResultMaterializer <T> reader) { Argument.NotNull(query, nameof(query)); Argument.NotNull(reader, nameof(reader)); var promise = new SqlResultPromise <T>(); AddExecutor((c, i) => { var result = new SqlQueryStrategy(_interactionFactory).Execute(query, reader, c, i); promise.SetValue(result); }); return(promise); }