Dapper icon indicating copy to clipboard operation
Dapper copied to clipboard

Fix #2028

Open davikor opened this issue 1 year ago • 0 comments

This fixes issue #2028 that occurs when executing ExecuteAsync on a CommandDefinition with Pipelined command flag in combination with multiple parameters on the Microsoft.Data.SqlClient and with MultipleActiveRecordSets set to true.

I simply applied the fix proposed in the issue and added a test to ensure that the issue is not occuring.

As far as I understand, the original version runs ExecuteNonQueryAsync on a DbCommand but disposes this command before awaiting the result ExecuteNonQueryAsync. With this fix this behavior is turned around. However, I am not sure how this affects other drivers, or why this issue did not occur with the System.Data.SqlClientdriver.

davikor avatar Nov 21 '24 13:11 davikor