예제 #1
0
 public async Task Lock(string lockName, Func <Task> callBack, int timeout = -1)
 {
     await DBTransactionHelper.SqlTransactionWorkAsync(DBTypes.SqlServer, false, false, _dbConnectionFactory.CreateAllForWorkflow(), async (conn, transaction) =>
     {
         await SqlServerApplicationLockHelper.Execute((SqlConnection)conn, (SqlTransaction)transaction, lockName, callBack, timeout);
     });
 }