Is it possible to execute several queries asynchronously? #1589
Comments
This isn't a Dapper issue, but a SQL Client/Server one in general. You'll need to enable it in the connection string, and note that there is some performance overhead to doing so (that's why it's not enabled by default). Here's how: https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/enabling-multiple-active-result-sets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have trouble executing several queries simultaneously (asynchronously). I am getting an error related to executing several actions simultaneously.
Stack: .NET 5, MS SQL, Dapper 2.0.78
In connection string I set MultipleActiveResultSets=False and I don't want to change it to True.
It's the error:
System.InvalidOperationException: The connection does not support MultipleActiveResultSets.\r\n at Microsoft.Data.SqlClient.SqlCommand.
Is there a solution in the Dapper to execute several queries asynchronously?
The text was updated successfully, but these errors were encountered: