I’m trying to write an asynchronous server that queries a SQL Server database and am concerned that my DB side is too synchronous. Specifically, I can call ExecuteReader asynchronously but cannot then call reader.Item asynchronously and is where 57% of the time is spent (blocking my precious thread!).
Is this the most asynchronous I can do with ADO.NET or is there an asynchronous way to do reader.Item as well?
Looks like this issue is to be fixed in the next version of the framework:
DbDataReader.ReadAsync
and
DbDataReader.NextResultAsync