You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ADO.NET includes DbCommand.Prepare() for command preparation, to speed up subsequent repeated executions of the command. As this method may perform I/O to create a server-side statement, it should have a DbCommand.PrepareAsync() counterpart. As with other ADO.NET async overloads, DbCommand should provide a default implementation which delegates to the sync version.
Agreed. I remember working on that NpgsqlCommand.Prepare() override some time ago, and it is a very natural method for an async version. I would assume the same would be true of other providers.
System.Data Triage: This looks like a good idea, although we are not going to implement it right away.
This related to another issue that calls for implementing async versions of other APIs that can block now.
Moving to Future.
Activity
JonHanna commentedon Nov 26, 2017
Agreed. I remember working on that
NpgsqlCommand.Prepare()override some time ago, and it is a very natural method for an async version. I would assume the same would be true of other providers.The API could be:
(The implementation need only be
{Prepare(); return Task.CompletedTask();}).divega commentedon Feb 8, 2018
System.Data Triage: This looks like a good idea, although we are not going to implement it right away.
This related to another issue that calls for implementing async versions of other APIs that can block now.
Moving to Future.
roji commentedon Feb 1, 2019
Closing in favor of dotnet/corefx#35012