Skip to content

Commit

Permalink
Tweaking error messages and supporting IDbConnection implementations … (
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccallum authored and NickCraver committed Mar 31, 2018
1 parent f9d7bff commit c6f9e81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Dapper/SqlMapper.Async.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,7 @@ private static Task TryOpenAsync(this IDbConnection cnn, CancellationToken cance
/// </summary>
private static DbCommand TrySetupAsyncCommand(this CommandDefinition command, IDbConnection cnn, Action<IDbCommand, object> paramReader)
{
var result = command.SetupCommand(cnn, paramReader);
if (result is DbCommand dbCommand)
if (command.SetupCommand(cnn, paramReader) is DbCommand dbCommand)
{
return dbCommand;
}
Expand Down

0 comments on commit c6f9e81

Please sign in to comment.