-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connection.ExecuteReaderAsync returns IDataReader which has no ReadAsync #1140
Comments
+1 |
I see your point, and that's very nice. Would be happy to take that as a PR (probably the quickest way to get it implemented). This also probably also ties into v2 API refactors, though. I'll start a separate issue for that. |
cross-ref #1293 |
I didn't see this at first, but this is a source-breaking change. Explained at #1295. |
This will be nice, thank you! |
jnm2
changed the title
connection.ExecuteReaderAsync returns IDataReader which has no ReadAsync
Connection.ExecuteReaderAsync returns IDataReader which has no ReadAsync
Mar 10, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's currently necessary to cast the returned IDataReader to DbDataReader in order to do anything asynchronous with it:
The extension method takes an IDbConnection, so this makes sense:
https://github.com/StackExchange/Dapper/blob/48f6754ad69c5bc196612ec23f4887062fa87e17/Dapper/SqlMapper.Async.cs#L1116
Would you please define this extension method next to it?
That way this code sample just works:
The text was updated successfully, but these errors were encountered: