Faithlife / FaithlifeData

Helpers for querying ADO.NET-compatible databases.
https://faithlife.github.io/FaithlifeData/
MIT License
6 stars 4 forks source link

Use DisposeAsync when available. #52

Closed ejball closed 3 years ago

bgrainger commented 3 years ago

This is a lot of extra code just for the theoretical purity of calling DisposeAsync. I'm not aware of a place that actually benefits from calling DisposeAsync (most commands are a no-op, as are most readers if all the data has been read), so this doesn't feel worth it.

ejball commented 3 years ago

This is a lot of extra code just for the theoretical purity of calling DisposeAsync.

IMHO "a lot" is overstating things a bit. It is true that this is just for completeness, operating under the assumption that they introduced IAsyncDisposable to ADO.NET for a reason.

bgrainger commented 3 years ago

assumption

I don't know that that assumption is warranted in the case of DbCommand.