예제 #1
0
            /// <summary>
            /// Deletes any connection request workflows tied to this workflow.
            /// </summary>
            private void DeleteConnectionRequestWorkflows()
            {
                var connectionRequestWorkflowService = new ConnectionRequestWorkflowService(RockContext);
                var connectionRequestWorkflows       = connectionRequestWorkflowService.Queryable().Where(c => c.WorkflowId == this.Entity.Id);

                if (connectionRequestWorkflows.Any())
                {
                    RockContext.BulkDelete(connectionRequestWorkflows);
                }
            }
예제 #2
0
        /// <summary>
        /// Deletes any connection request workflows tied to this connection workflow.
        /// </summary>
        /// <param name="dbContext">The database context.</param>
        private void DeleteConnectionRequestWorkflows(Data.DbContext dbContext)
        {
            var rockContext = ( RockContext )dbContext;
            var connectionRequestWorkflowService = new ConnectionRequestWorkflowService(rockContext);
            var connectionRequestWorkflows       = connectionRequestWorkflowService.Queryable().Where(c => c.ConnectionWorkflowId == this.Id);

            if (connectionRequestWorkflows.Any())
            {
                dbContext.BulkDelete(connectionRequestWorkflows);
            }
        }