protected override ArticlePage UpdatePageContent(IUpdateBasePageModel updateModel) { var page = base.UpdatePageContent(updateModel); page.MainBody = (updateModel as AddUpdateArticlePageViewModel)?.MainBody; return(page); }
protected virtual T UpdatePageContent(IUpdateBasePageModel updateModel) { if (!_contentRepository.TryGet <T>(updateModel.CurrentPageId, out var existingPage)) { return(existingPage); } var updatedPage = (T)existingPage.CreateWritableClone(); if (!string.IsNullOrEmpty(updateModel.PageName)) { updatedPage.PageName = updateModel.PageName; } updatedPage.OpenGraphTitle = updateModel.OpenGraphTitle; updatedPage.Robots = updateModel.Robots; return(updatedPage); }