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).
Added .NET 4.5 style QueryAsync method to support asynchronous databa…
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.
Calling ExecuteReaderAsync against DbCommand instead of SqlCommand to…
… 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.
Added async versions of Query methods that do multi-mapping like Quer…
…yAsync<TFirst, TSecond, TReturn>
Merge branch 'master' of git://github.com/SamSaffron/dapper-dot-net
Added two more multi-mapping parameter types for a total of 7.
+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.
Async; manual merge of StackExchange/Dapper#49
- huge thanks to bkaid