Example #1
0
        /// <summary>
        /// Adds the specified aggregate.
        /// </summary>
        /// <param name="aggregate">The aggregate.</param>
        public void Add(T aggregate)
        {
            var op = new AddOperation(_domains, aggregate, _logger);
            var tx = Transaction.Current;

            if (tx == null)
            {
                op.OnCommit();
            }
            else
            {
                tx.EnlistVolatile(op, EnlistmentOptions.None);
            }
        }