Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Example use of transactions in async method #1531

Answered by bgrainger
bsiewert-aya asked this question in Q&A
Discussion options

Hello,

I'm new to MySqlConnector and had a question about the use of transactions.

I'm studying the example console application in the documentation found here:
https://mysqlconnector.net/tutorials/best-practices/

With this example below, can you provide a proper usage with transactions if I were to use the same task in the example console app but use a transaction to upsert records in each task?

image

You must be logged in to vote

Replies: 1 comment

Comment options

You would use BeginTransactionAsync and CommitAsync.

You must be logged in to vote
0 replies
Answer selected by bsiewert-aya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #1530 on December 10, 2024 16:36.

AltStyle によって変換されたページ (->オリジナル) /