Пример #1
0
        /// <summary>
        /// Initializes the unit of work.
        /// </summary>
        protected StatelessUnitOfWorkBase(bool createTransaction, ISessionProvider sessionProvider)
        {
            _session = sessionProvider.GetStatelessSession();

            if (createTransaction)
            {
                Session.BeginTransaction();
                _transactionStarted = true;
            }
        }
Пример #2
0
        /// <summary>
        /// Initializes the unit of work.
        /// </summary>
        protected StatelessUnitOfWorkBase(bool createTransaction, ISessionProvider sessionProvider)
        {
            _session = sessionProvider.GetStatelessSession();

            if (createTransaction)
            {
                Session.BeginTransaction();
                _transactionStarted = true;
            }
        }