Esempio n. 1
0
        /// <summary>
        /// Pres the save changes.
        /// </summary>
        /// <param name="dbContext">The database context.</param>
        /// <param name="entry">The entry.</param>
        public override void PreSaveChanges(Data.DbContext dbContext, DbEntityEntry entry)
        {
            if (entry.State == EntityState.Added)
            {
                var transaction = new Rock.Transactions.ConnectionRequestActivityChangeTransaction(entry);
                Rock.Transactions.RockQueue.TransactionQueue.Enqueue(transaction);
            }

            base.PreSaveChanges(dbContext, entry);
        }
            /// <summary>
            /// Called before the save operation is executed.
            /// </summary>
            protected override void PreSave()
            {
                if (State == EntityContextState.Added)
                {
                    var transaction = new Rock.Transactions.ConnectionRequestActivityChangeTransaction(this.Entity);
                    Rock.Transactions.RockQueue.TransactionQueue.Enqueue(transaction);
                }

                base.PreSave();
            }