From c6f9e81761d3bf6ebf83fa61283cb115d664ab4d Mon Sep 17 00:00:00 2001 From: Ben McCallum Date: Sat, 31 Mar 2018 15:22:45 +0200 Subject: [PATCH] =?UTF-8?q?Tweaking=20error=20messages=20and=20supporting?= =?UTF-8?q?=20IDbConnection=20implementations=20=E2=80=A6=20(#987)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dapper/SqlMapper.Async.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dapper/SqlMapper.Async.cs b/Dapper/SqlMapper.Async.cs index a743bb4c3..c25f06cfe 100644 --- a/Dapper/SqlMapper.Async.cs +++ b/Dapper/SqlMapper.Async.cs @@ -393,8 +393,7 @@ private static Task TryOpenAsync(this IDbConnection cnn, CancellationToken cance /// private static DbCommand TrySetupAsyncCommand(this CommandDefinition command, IDbConnection cnn, Action paramReader) { - var result = command.SetupCommand(cnn, paramReader); - if (result is DbCommand dbCommand) + if (command.SetupCommand(cnn, paramReader) is DbCommand dbCommand) { return dbCommand; }