public void Save(CmsContent item) { CmsContentDao dao = new CmsContentDao(); using (Transaction tx = new Transaction()) { dao.Save<CmsContent>(item); tx.Commit(); } SitePageCacheRefreshInvoker.InvokeRefresh(item.SubscriptionId, SitePageRefreshRequest.PageRefreshType.All); }
public CmsContent CreateContent(CmsContent content, System.Web.UI.WebControls.Table dynamicControls) { if (content.SubscriptionId == null) throw new ApplicationException("The subscription id must not be null. This is a programming error."); IList<CmsContentField> fields = new List<CmsContentField>(); PopulateFields(content.SubscriptionId,dynamicControls, content, null); CmsContentDao dao = new CmsContentDao(); using (Transaction tx = new Transaction()) { dao.Save<CmsContent>(content); tx.Commit(); } return content; }