Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Repository{T}" /> class.
        /// </summary>
        /// <param name="resourceManager">The resource manager. Used for enlisting in external transaction. (not for Esent transaction)</param>
        /// <exception cref="System.ArgumentNullException">resourceManager was Null</exception>
        public Repository(EsentStoreResourceManager <T> resourceManager)
        {
            if (resourceManager == null)
            {
                throw new ArgumentNullException("resourceManager");
            }

            this.store = resourceManager.Store;
        }
Пример #2
0
        public EsentStoreResourceManager(IEsentStore <T> store)
        {
            if (Transaction.Current != null)
            {
                Debug.Assert(Transaction.Current.TransactionInformation.Status == TransactionStatus.Active);
                this.Enlistment = Transaction.Current.EnlistVolatile(this, EnlistmentOptions.None);
            }

            this.Store = store;
        }
Пример #3
0
        //private EsentStoreResourceManager<T> rm;

        /// <summary>
        /// Initializes a new instance of the <see cref="Repository{T}" /> class.
        /// </summary>
        /// <param name="store">The store.</param>
        public Repository(IEsentStore <T> store)
        {
            this.store = store;
        }