Open abe545 opened 8 years ago
This is unfortunately not fixable with this style of calling. How would we know when the result is no longer needed? However, developers can mitigate the issue if they use the new ExecuteNonQueryAsync
(merged in #86 ):
public async Task Call()
{
try
{
await connection.ExecuteNonQueryAsync().usp_Sproc();
}
catch (Exception ex)
{
Log(ex);
throw;
}
}
49 fixed the issue when the result is cast to something. However, if the results are never cast to a different object, the connection is never closed. This is a big issue for code like the following: