-
-
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
Add .NET 4.5 specific project to support Task Based Async calls #49
Conversation
…se calls. Requires SQL Server because ExecuteReaderAsync is defined on SqlCommand and not IDbCommand.
Actually, this is defined on the DbCommand: http://msdn.microsoft.com/en-us/library/hh223695.aspx - if possible, the least-specific version is preferable; however, I think this is more complex than first appears. In particular, I've got consideration towards things that decorate the command pattern (mini-profiler etc). We might need to invest a bit of time thinking about how we do this correctly in the more general context. I imagine a task with continuation would do it. I think jumping on the sql-server one would be a bit of a mistake, long-term. Might be better to hold on this for now, pending more investigation. I am perfectly open to a new 4.5-specific build; that doesn't bother me. |
… make it more generic.
Thanks Marc - didn't catch that it was available on DbCommand. I updated my fork to use DbCommand instead of SqlCommand. This attempt was as good as I could do. You and Sam are the experts here so I'll let you guys figure out the best approach. But it would be great if Dapper had built-in support for async querying. |
+1 for Async support. |
👍 Async support too |
I've merged this; thanks! Note: was a manual merge (conflicts etc), but seems to work. My preference would be to drag this into the core dll for 4.5, rather than a second nuget package - any thoughts on that? Have a look at the merged base and let me know. |
Thanks Marc. I agree it would be great to have in the core nuget package and once its available I'll update the notes on my dapper-async nuget to indicate that the package is deprecated since the functionality has been moved to core dapper package. |
- huge thanks to bkaid
- huge thanks to bkaid
- huge thanks to bkaid
Added a QueryAsync method using .NET 4.5 style task based async call to ExecuteReaderAsync. Updated .nuspec file to include a .NET 4.5 library. Currently SQL server specific because SqlCommand defines ExecuteReaderAsync (not IDbCommand).