Ejemplo n.º 1
0
        public virtual object Execute(CommandContext commandContext)
        {
            IPropertyManager propertyManager = commandContext.PropertyManager;

            PropertyEntity propertyEntity = propertyManager.FindPropertyById(Name);

            if (propertyEntity != null)
            {
                propertyManager.Delete(propertyEntity);
            }

            return(null);
        }
Ejemplo n.º 2
0
        public virtual object Execute(CommandContext commandContext)
        {
            IPropertyManager propertyManager = commandContext.PropertyManager;

            PropertyEntity property = propertyManager.FindPropertyById(Name);

            if (property != null)
            {
                // update
                property.Value = Value;
            }
            else
            {
                // create
                property = new PropertyEntity(Name, Value);
                propertyManager.Add(property);
            }

            return(null);
        }