public virtual object Execute(CommandContext commandContext) { IPropertyManager propertyManager = commandContext.PropertyManager; PropertyEntity propertyEntity = propertyManager.FindPropertyById(Name); if (propertyEntity != null) { propertyManager.Delete(propertyEntity); } return(null); }
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); }