Advertisement
yambroskin

Untitled

Sep 15th, 2017
471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.93 KB | None | 0 0
  1.    foreach (var client in clientList)
  2.                     {
  3.                         using (var unitOfWork = unitOfWorkManager.Create(string.Empty, true, IsolationLevel.ReadCommitted))
  4.                         {
  5.                             try
  6.                             {
  7.                                 if (client.UpdateGovPurchases())
  8.                                 {
  9.                                     unitOfWork.Commit();
  10.                                 }
  11.                                 else
  12.                                 {
  13.                                     unitOfWork.Rollback();
  14.                                 }
  15.                             }
  16.                             catch (Exception message)
  17.                             {
  18.                                 Logger.Log.Error(message);
  19.                                 unitOfWork.Rollback();
  20.                             }
  21.                         }
  22.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement