public void EditPost(ContentRegistrationPM contentPresentationModel, IEnumerable <string> tags) { var content = contentPresentationModel.GetContent(); content.Text = HtmlParser.Parse(content.Text); content.Text = HtmlMinifier.MinifyHtml(content.Text); ContentBiz.UpdateContent(content, tags); UnitOfWork.SaveChanges(); }
public void AddArticle(ContentRegistrationPM contentPresentationModel, IEnumerable <string> tags) { var content = contentPresentationModel.GetContent(); content.Type = ContentType.Article; content.CultureLcid = CultureInfo.GetCultureInfo("fa-IR").LCID; content.Text = HtmlParser.Parse(content.Text); content.Text = HtmlMinifier.MinifyHtml(content.Text); ArticleBiz.AddContent(content, tags); UnitOfWork.SaveChanges(); contentPresentationModel.Id = content.Id; }
public void AddPost(int blogId, ContentRegistrationPM contentPresentationModel, IEnumerable <string> tags) { var content = contentPresentationModel.GetContent(); content.Type = ContentType.BlogPost; content.CultureLcid = CultureInfo.GetCultureInfo("fa-IR").LCID; content.Text = HtmlParser.Parse(content.Text); content.Text = HtmlMinifier.MinifyHtml(content.Text); content.PublicationId = blogId; ContentBiz.AddContent(content, tags); UnitOfWork.SaveChanges(); contentPresentationModel.Id = content.Id; }