You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
mercurial-moon
changed the title
Pitfalls of using Petopoco async api inside using.
Pitfalls of using Petapoco async api inside using.
Sep 24, 2024
Are there any pitfalls of using PetaPoco async api with a using statement.
My current pattern is
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 theupdate
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.The text was updated successfully, but these errors were encountered: