public static async Task <T> RunAndSingleAsync <T>(this IAsyncStatementRunner runner, string statement,
                                                           object parameters, Func <IRecord, T> operation)
        {
            var cursor = await runner.RunAsync(statement, parameters);

            var result = await cursor.SingleAsync(operation);

            return(result);
        }
        public static async Task <IResultSummary> RunAndConsumeAsync(this IAsyncStatementRunner runner, string statement,
                                                                     object parameters = null)
        {
            var cursor = await runner.RunAsync(statement, parameters);

            var summary = await cursor.ConsumeAsync();

            return(summary);
        }
 public static Task <IRecord> RunAndSingleAsync(this IAsyncStatementRunner runner, string statement, object parameters)
 {
     return(RunAndSingleAsync(runner, statement, parameters, r => r));
 }