Update gesitone async contesto di transazione su DB
This commit is contained in:
@@ -54,13 +54,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Job
|
||||
bool done = await dbCtx.SaveChangesAsync() > 0;
|
||||
|
||||
if (done)
|
||||
tx.Commit();
|
||||
await tx.CommitAsync();
|
||||
|
||||
return done;
|
||||
}
|
||||
catch
|
||||
{
|
||||
tx.Rollback();
|
||||
await tx.RollbackAsync();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -126,13 +126,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Job
|
||||
bool done = await dbCtx.SaveChangesAsync() > 0;
|
||||
|
||||
if (done)
|
||||
tx.Commit();
|
||||
await tx.CommitAsync();
|
||||
|
||||
return done;
|
||||
}
|
||||
catch
|
||||
{
|
||||
tx.Rollback();
|
||||
await tx.RollbackAsync();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user