public override void ExecuteWith(IMigrationProcessor processor)
        {
            var exp = new PerformDBOperationExpression()
            {
                Operation = (connection, transaction) =>
                {
                    var helper = new ReferenceListDbHelper(connection, transaction);
                    var id     = helper.GetReferenceListId(Namespace, Name);
                    if (id == null)
                    {
                        return;
                    }

                    if (Description.IsSet)
                    {
                        helper.UpdateReferenceListDescription(id, Description.Value);
                    }
                    if (NoSelectionValue.IsSet)
                    {
                        helper.UpdateReferenceListNoSelectionValue(id, NoSelectionValue.Value);
                    }
                }
            };

            processor.Process(exp);
        }
Exemplo n.º 2
0
        public override void ExecuteWith(IMigrationProcessor processor)
        {
            var exp = new PerformDBOperationExpression()
            {
                Operation = (connection, transaction) => {
                    var helper    = new ReferenceListDbHelper(connection, transaction);
                    var refListId = helper.InsertReferenceList(Namespace, Name, Description);

                    if (NoSelectionValue.IsSet)
                    {
                        helper.UpdateReferenceListNoSelectionValue(refListId, NoSelectionValue.Value);
                    }
                }
            };

            processor.Process(exp);
        }