コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }