dapper-query-builder

Generate optimized Dapper read queries for PostgreSQL with multi-mapping and pagination.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/hiiamsky/multi-agent-dev-team --skill dapper-query-builder-hiiamsky
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dapper-query-builder
Source: https://github.com/hiiamsky/multi-agent-dev-team/tree/main/.github/skills/dotnet-dapper-query
Command: npx skills add https://github.com/hiiamsky/multi-agent-dev-team --skill dapper-query-builder-hiiamsky

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Complex data-access layers require writing verbose, error-prone SQL for read operations. This skill provides a templated approach to generate optimized Dapper-based read queries with multi-mapping, pagination, and safe parameterization, reducing boilerplate and improving performance.

Core Features & Use Cases

  • Multi-mapping for joins to assemble rich DTOs without N+1 queries.
  • Parameterized queries with strong type mapping to DTOs.
  • Pagination and efficient filtering via OFFSET/FETCH and dynamic conditions.
  • Support for common table expressions (CTEs) for complex data access patterns.
  • Use Case: rapidly scaffold GetById and paginated search query handlers for domain entities.

Quick Start

Supply the entity details and required read patterns to generate a Dapper-based query handler template.

Frequently Asked Questions about dapper-query-builder

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

FAQPage Schema
How do I generate optimized Dapper read queries with multi-mapping for joined entities?▼

To generate optimized Dapper read queries with multi-mapping, you supply entity details and required read patterns to produce a templated query handler. This approach assembles rich DTOs from joined entities without N+1 queries, enforcing parameterized SQL and proper column aliasing.

What is the best way to implement pagination in Dapper for PostgreSQL read operations?▼

The best way to implement pagination in Dapper for PostgreSQL is using OFFSET and FETCH clauses within parameterized queries. This skill generates dynamic filtering conditions and paginated results to efficiently retrieve specific data pages.

Can I use common table expressions with Dapper for complex data access patterns?▼

Yes, you can use common table expressions with Dapper for complex data access patterns. This skill supports CTEs to structure complex read operations while maintaining parameterized SQL and strong type mapping to DTOs.

Does this Dapper query builder support .NET 8 and strong type mapping?▼

Yes, this Dapper query builder supports .NET 8 and provides strong type mapping to DTOs. It enforces parameterized SQL and proper column aliasing to ensure type safety and compatibility with modern .NET runtimes.

Why do I need parameterized SQL when scaffolding GetById query handlers in Dapper?▼

You need parameterized SQL when scaffolding GetById query handlers to prevent SQL injection and ensure safe data access. This skill enforces parameterized queries with strong type mapping to reduce boilerplate and improve read performance.