-
Notifications
You must be signed in to change notification settings - Fork 930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Add support for BeginTransactionAsync #3139
base: master
Are you sure you want to change the base?
Conversation
{ | ||
if (isolationLevel == IsolationLevel.Unspecified) | ||
{ | ||
return connection.BeginTransactionAsync(cancellationToken); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maca88 I tried to fix this by using 'alwaysAwait' option, but I could not quite figure out the syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix this change the alwaysAwait
section to:
alwaysAwait:
- name: BeginTransaction
The filter BeginTransactionAsync
could also work but the containingTypeName
filter would need to be changed from AsyncExtensions
to DriverBase
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does it work? I thought it identifies the method that should be always awaited.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With alwaysAwait
you define filters that are applied on every generated async method to check whether to force await invocations inside the method body. So if we take the above filter as an example, every generated async method that has a sync counterpart named BeginTransaction
will be generated by using async/await
even if some of them could be generated without it.
No description provided.