query-handler
CommunityPaginated, filtered MediatR query handlers
AuthorFaysilAlshareef
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill standardizes the implementation of MediatR query handlers so that list and single-entity queries are paginated, filtered, and mapped to DTO outputs consistently across a .NET microservice codebase, reducing duplicated query logic and incorrect data returns.
Core Features & Use Cases
- Uses an IUnitOfWork with named repositories so handlers delegate filtering, pagination, and sorting to repository methods.
- Defines list query records with pagination and filter parameters, and output classes with PageSize, CurrentPage, Total, and typed collections for predictable paging responses.
- Covers single-entity queries that use FindAsync then map to DTOs and throw domain-specific not-found exceptions; supports injecting additional services for enrichment when needed.
Quick Start
Create a GetOrdersHandler that uses IUnitOfWork.Orders to return a paginated GetOrdersOutput mapped to OrderOutput.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: query-handler Download link: https://github.com/FaysilAlshareef/dotnet-ai-kit/archive/main.zip#query-handler Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.