/// <summary> /// Run Incremental Import (just for testing) /// doesn't write ImportLog entry /// </summary> /// <param name="filename"></param> /// <param name="impNr"></param> public void TestRunIncrementalImport(string filename, int impNr) { using (var transactionScope = transactionScopeFactory.CreateReadWrite()) { SingleTransactionCommitter transactionCommitter = new SingleTransactionCommitter(transactionScope); RunIncrementalImport(transactionCommitter, filename, impNr); transactionScope.Commit(); } }
public void ForceNext() { Counter = 0; CurrentTransactionScope.Commit(); CurrentTransactionScope.Dispose(); CurrentTransactionScope = transactionScopeFactory.CreateReadWrite(); }
private static void DoAxisUpdate(TransactionScopeFactory transactionScopeFactory, string mandantName) { using (var transactionScope = transactionScopeFactory.CreateReadWrite()) { Mandant testMandant = transactionScope.Session.QueryOver <Mandant>().Where(o => o.MandantName == mandantName).SingleOrDefault(); ErfassungsPeriod erfPeriod = transactionScope.Session.QueryOver <ErfassungsPeriod>().Where(o => o.Mandant == testMandant).OrderBy(o => o.Erfassungsjahr).Desc.List().First(); //AxisDataUtils.ClearAxisDataForMandant(transactionScope.Session, testMandant.Id); AchsenAutoUpdate axisUpdate = new AchsenAutoUpdate(transactionScope.Session, testMandant, erfPeriod, testMandant.OwnerId); axisUpdate.Start(); transactionScope.Commit(); } }
public MultiTransactionCommitter(TransactionScopeFactory transactionScopeFactory) { this.transactionScopeFactory = transactionScopeFactory; CurrentTransactionScope = transactionScopeFactory.CreateReadWrite(); }