public static IQueryable <Content> Children(this Content content, IHiveManager hiveManager) { var childIds = content.AllChildIds(); // Not exactly sure why we need to do it this way, but when done the other way, it doesn't trigger the content type mapper // and therfore looses it's sort order return(hiveManager.Query <TypedEntity, IContentStore>().OfRevisionType(FixedStatusTypes.Published).InIds(childIds) .ToList().Select(x => hiveManager.FrameworkContext.TypeMappers.Map <Content>(x)).AsQueryable()); //return hiveManager.QueryContent().OfRevisionType(FixedStatusTypes.Published).InIds(childIds); }
public static IQueryable <T> QueryContent <T>(this IHiveManager hiveManager) where T : class, IReferenceByHiveId { return(hiveManager.Query <T, IContentStore>()); }
public DynamicContentList(HiveId sourceId, IHiveManager hiveManager, object defaultValueIfNull, IEnumerable <HiveId> containedIds) : this(sourceId, hiveManager, defaultValueIfNull, containedIds, hiveManager.Query <TypedEntity, IContentStore>().OfRevisionType(FixedStatusTypes.Published).InIds(containedIds.ToArray())) { }