orchardcore-content-queries

Query Orchard Core content items via YesSql ContentItemIndex and IContentManager.

13|3|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/CrestApps/CrestApps.AgentSkills --skill orchardcore-content-queries
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orchardcore-content-queries
Source: https://github.com/CrestApps/CrestApps.AgentSkills/tree/main/src/CrestApps.AgentSkills.Skills/orchardcore/orchardcore-content-queries
Command: npx skills add https://github.com/CrestApps/CrestApps.AgentSkills --skill orchardcore-content-queries

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill enables developers to efficiently query Orchard Core content items using YesSql indexes and IContentManager, replacing manual, error-prone data access.

Core Features & Use Cases

  • YesSql-based querying over ContentItemIndex for fast, scalable content searches.
  • IContentManager integration to perform high-level content operations (Get, New, Create, Publish, Update).
  • Support for paging, filtering by content type, and published/latest status to meet common data-access scenarios.

Quick Start

Query content items by type using ContentItemIndex and IContentManager to retrieve published results.

// Example usage (conceptual)
ISession session = ...;
var items = await session.Query<ContentItem, ContentItemIndex>(
    x => x.ContentType == "BlogPost" && x.Published)
    .ListAsync();

Frequently Asked Questions about orchardcore-content-queries

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Orchard Core content items by ContentType using YesSql?

Query Orchard Core content items by filtering ContentItemIndex with a ContentType predicate using ISession. Call Query<ContentItem, ContentItemIndex> with a lambda expression matching your target type and execute ListAsync to retrieve results.

What is the best way to filter published content items in Orchard Core?

Filter published content items by applying a Published boolean predicate to ContentItemIndex within your YesSql ISession query. This targets only live content versions, ensuring scalable retrieval of published records without loading drafts.

Can I use IContentManager to retrieve Orchard Core content instead of YesSql?

IContentManager handles high-level content operations like Get, New, Create, Publish, and Update. For scalable querying and filtering by index properties, use YesSql ISession queries against ContentItemIndex instead of IContentManager.

How do I implement paging for Orchard Core content queries?

Implement paging by applying Skip and Take operators to your YesSql ISession query over ContentItemIndex. Execute ListAsync asynchronously to retrieve the targeted page of content items while maintaining scalable access patterns.

Does querying Orchard Core content with YesSql require async patterns?

Yes, async query patterns are required to ensure scalable access when querying Orchard Core content items. Use ListAsync on ISession queries to prevent blocking threads during content retrieval from YesSql indexes.

What is the difference between Latest and Published status in ContentItemIndex?

Published status filters for currently live content versions, while Latest status targets the most recent version regardless of publication state. Both boolean flags exist on ContentItemIndex for precise YesSql query filtering.