Changeset 17825 for branches/3040_VectorBasedGP/HeuristicLab.Services.Hive.DataAccess/3.3/Manager/PersistenceManager.cs
- Timestamp:
- 01/27/21 14:10:56 (4 years ago)
- Location:
- branches/3040_VectorBasedGP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP
- Property svn:mergeinfo changed
-
branches/3040_VectorBasedGP/HeuristicLab.Services.Hive.DataAccess
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Services.Hive.DataAccess (added) merged: 17574
- Property svn:mergeinfo changed
-
branches/3040_VectorBasedGP/HeuristicLab.Services.Hive.DataAccess/3.3/Manager/PersistenceManager.cs
r17180 r17825 184 184 #region Transaction management 185 185 public void UseTransaction(Action call, bool repeatableRead = false, bool longRunning = false) { 186 UseTransaction<object>(() => { 187 call(); 188 return null; 189 }); 186 UseTransaction<object>(() => { call(); return null; }, repeatableRead, longRunning); 187 } 188 189 public void UseTransactionAndSubmit(Action call, bool repeatableRead = false, bool longRunning = false) { 190 UseTransaction(() => { call(); SubmitChanges(); }, repeatableRead, longRunning); 190 191 } 191 192 … … 211 212 } 212 213 214 public T UseTransactionAndSubmit<T>(Func<T> call, bool repeatableRead = false, bool longRunning = false) { 215 return UseTransaction(() => { var res = call(); SubmitChanges(); return res; }, repeatableRead, longRunning); 216 } 217 213 218 private static TransactionScope CreateTransaction(bool repeatableRead, bool longRunning) { 214 219 var options = new TransactionOptions {
Note: See TracChangeset
for help on using the changeset viewer.