From bb9d7ab5bd2a537a0dc374930f381c369de5c398 Mon Sep 17 00:00:00 2001 From: Sergey Akopov Date: Sat, 26 Nov 2016 13:09:50 -0700 Subject: [PATCH] Add ExecuteScalarAsync support. --- .../IAmbientDbContextQueryProxy.cs | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/source/Dapper.AmbientContext/IAmbientDbContextQueryProxy.cs b/source/Dapper.AmbientContext/IAmbientDbContextQueryProxy.cs index 2e2842a..6004200 100644 --- a/source/Dapper.AmbientContext/IAmbientDbContextQueryProxy.cs +++ b/source/Dapper.AmbientContext/IAmbientDbContextQueryProxy.cs @@ -39,6 +39,86 @@ namespace Dapper.AmbientContext /// public interface IAmbientDbContextQueryProxy { + /// + /// Execute parameterized SQL that selects a single value asynchronously using + /// .NET 4.5 . + /// + /// + /// The SQL statement to execute. + /// + /// + /// The SQL query parameters. + /// + /// + /// The number of seconds before command execution timeout. + /// + /// + /// Determines whether the command is a stored procedure or a batch. + /// + /// + /// The first cell selected. + /// + Task ExecuteScalarAsync( + string sql, + object param = null, + int? commandTimeout = null, + CommandType? commandType = null); + + /// + /// Execute parameterized SQL that selects a single value asynchronously using + /// .NET 4.5 . + /// + /// + /// The return type. + /// + /// + /// The SQL statement to execute. + /// + /// + /// The SQL query parameters. + /// + /// + /// The number of seconds before command execution timeout. + /// + /// + /// Determines whether the command is a stored procedure or a batch. + /// + /// + /// The first cell selected. + /// + Task ExecuteScalarAsync( + string sql, + object param = null, + int? commandTimeout = null, + CommandType? commandType = null); + + /// + /// Execute parameterized SQL that selects a single value asynchronously using + /// .NET 4.5 . + /// + /// + /// The SQL command definition. + /// + /// + /// The first cell selected. + /// + Task ExecuteScalarAsync(CommandDefinition command); + + /// + /// Execute parameterized SQL that selects a single value asynchronously using + /// .NET 4.5 . + /// + /// + /// The return type. + /// + /// + /// The SQL command definition. + /// + /// + /// The first cell selected. + /// + Task ExecuteScalarAsync(CommandDefinition command); + /// /// Execute a query asynchronously using .NET 4.5 . ///