Providing a query builder off of the IContentManager interface.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042269
This commit is contained in:
loudej
2009-11-26 00:41:00 +00:00
parent 9bf113b224
commit 72d8a24ec4
25 changed files with 677 additions and 102 deletions

View File

@@ -5,7 +5,7 @@ using Orchard.Security;
namespace Orchard.Blogs.Models {
public class BlogPost : ContentPart<BlogPostRecord> {
//public Blog Blog { get; set; }
public Blog Blog { get; set; }
public string Title { get { return this.As<RoutableAspect>().Title; } }
public string Body { get { return this.As<BodyAspect>().Body; } }
public string Slug { get { return this.As<RoutableAspect>().Slug; } }

View File

@@ -11,7 +11,7 @@ namespace Orchard.Blogs.Models {
Filters.Add(new ActivatingFilter<RoutableAspect>("blogpost"));
Filters.Add(new ActivatingFilter<BodyAspect>("blogpost"));
Filters.Add(new StorageFilter<BlogPostRecord>(repository));
//AddOnLoaded<BlogPost>((context, bp) => bp.Blog = contentManager.Get<Blog>(context.ContentItem.Id));
AddOnLoaded<BlogPost>((context, bp) => bp.Blog = contentManager.Get<Blog>(bp.Record.Blog.Id));
}
}
}