-
Notifications
You must be signed in to change notification settings - Fork 600
Open
Description
Are there any pitfalls of using PetaPoco async api with a using statement.
My current pattern is
using (var db = new Database(connStr, "Npgsql")){
await db.BeginTransactionAsync();
// some select statements using await
// some update statements using await
await db.CompleteTransactionAsync();
}
I see that when i run this code, i find certain transactions are not committed while some are, no exceptions are thrown... so i'm not really sure where things are going wrong.
To further add to the above i'm running multiple instances of the above app, on different machines and they all are talking to one db server.
When i step into the above using block and step over the update statement i see that the return shows the number 1 which means that 1 row was edited. But when I check the db the changes are not reflected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels