public ITransactionManager BatchExecute(Action <IStatelessSession> executeTransaction) { IStatelessSession statelessSession = _sessionFactoryManager.OpenStatelessSession(); try { using (statelessSession.BeginTransaction()) { executeTransaction(statelessSession); statelessSession.Transaction.Commit(); } } catch (Exception excep) { statelessSession.Transaction.Rollback(); Log.Error(excep); } return(this); }
public object Create(IContext context) { return(_sessionFactoryManager.OpenStatelessSession()); }