public CommandResult Execute(IResourceService iResourceService)
        {
            var result = new CommandResult();
            if(!IsUndo)
            {

                var undo = new UpdateResourceCommand
                                                 {Resource = iResourceService.GetResource(_resource.Id), IsUndo = true};

                var ser = new XmlStringSerializer();

                var serialized = ser.Serialize(undo);

                var suc = new SavedUndoCommand
                {
                    Id = Guid.NewGuid(),
                    CreatedDate = DateTime.Now,
                    SerializedCommand = serialized
                };

                result.UndoCommandId = iResourceService.SaveUndoCommand(suc);

            }

            iResourceService.UpdateResourceCategories(_resource);
            return result;
        }