/// <summary> /// If the url slug is autogenerated, we need to update it only when the custom entity is published. /// </summary> private async Task UpdateUrlSlugIfRequired(CustomEntityVersion dbVersion, ICustomEntityDefinition definition) { if (!definition.AutoGenerateUrlSlug) { return; } var urlCommand = new UpdateCustomEntityUrlCommand() { CustomEntityId = dbVersion.CustomEntityId, LocaleId = dbVersion.CustomEntity.LocaleId, UrlSlug = SlugFormatter.ToSlug(dbVersion.Title) }; await _commandExecutor.ExecuteAsync(urlCommand); }
public Task UpdateUrlAsync(UpdateCustomEntityUrlCommand command) { return(ExtendableContentRepository.ExecuteCommandAsync(command)); }
public Task UpdateCustomEntityUrlAsync(UpdateCustomEntityUrlCommand command, IExecutionContext executionContext = null) { return(_commandExecutor.ExecuteAsync(command, executionContext)); }