private ContentPublished Publish(int contentId) { Content c = _contentRepository.Get(contentId); if (c == null) { throw new Exception("Not valid content."); } IDictionary <string, object> propertyValues = new Dictionary <string, object>(); propertyValues.Add("Content", c); ContentPublished pc = _contentPublishedRepository.FindOne(propertyValues); if (pc != null) { _contentPublishedRepository.Delete(pc); } pc = ContentPublishedFactory.CreateFromContent(c); _contentPublishedRepository.SaveOrUpdate(pc); c.LastContentPublished = pc; return(pc); }
protected Task On(ContentPublished @event, EnvelopeHeaders headers) { return(ForSchemaIdAsync(@event.SchemaId.Id, collection => { return collection.UpdateAsync(@event, headers, x => { x.IsPublished = true; }); })); }
protected void On(ContentPublished @event) { isPublished = true; }
public ActionResult SiteMap() { ContentPublished c = contentService.Get(new ContentCategory(12), ContentType.Private); return(View("Private", c)); }
public ActionResult TermsOfUse() { ContentPublished c = contentService.Get(new ContentCategory(10), ContentType.Private); return(View("Private", c)); }
public ActionResult Recommendations() { ContentPublished c = contentService.Get(new ContentCategory(13), ContentType.Private); return(View("Private", c)); }
public ActionResult AboutUs() { ContentPublished c = contentService.Get(new ContentCategory(4), ContentType.Private); return(View("Private", c)); }