Using await using on types implementing IAsyncDisposable.
Also, awaiting on ExecuteNonQueryAsync where it's used, in order to get a clearer callstack when exceptions are thrown.
In addition, returning index + 1 in PersistEventAsync instead of index++ which also needlessly modifies index.
Purpose
This pull request is a:
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[X] Simple performance and debuggability improvements
Checklist
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)
Description
Using
await using
on types implementingIAsyncDisposable
. Also, awaiting onExecuteNonQueryAsync
where it's used, in order to get a clearer callstack when exceptions are thrown. In addition, returningindex + 1
inPersistEventAsync
instead ofindex++
which also needlessly modifiesindex
.Purpose
This pull request is a:
Checklist