using System; using System.Web.Mvc; using Orchard.ContentManagement.Aspects; using Orchard.Core.Common.Models; using Orchard.ContentManagement; using Orchard.Security; namespace Orchard.Blogs.Models { public class BlogPost : ContentPart { [HiddenInput(DisplayValue = false)] public int Id { get { return ContentItem.Id; } } public string Title { get { return this.As().Title; } } public string Slug { get { return this.As().Slug; } set { this.As().Slug = value; } } public Blog Blog { get { return this.As().Container.As(); } set { this.As().Container = value; } } public IUser Creator { get { return this.As().Owner; } set { this.As().Owner = value; } } public DateTime? Published { get { return this.As().PublishedUtc; } set { this.As().PublishedUtc = value; } } } }