dapper-query-builder

Generate optimized Dapper read queries with multi-mapping, pagination, and dynamic filtering.

69|13|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/ronnythedev/dotnet-clean-architecture-skills --skill dapper-query-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dapper-query-builder
Source: https://github.com/ronnythedev/dotnet-clean-architecture-skills/tree/main/sample/POS/.claude/skills/19-dapper-query-builder
Command: npx skills add https://github.com/ronnythedev/dotnet-clean-architecture-skills --skill dapper-query-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates boilerplate data access by generating high-performance read queries with Dapper, enabling precise control over SQL and result mapping.

Core Features & Use Cases

  • Multi-mapping: Join and map complex results to DTOs efficiently.
  • Pagination & Filtering: Implement page-based data retrieval with safe, parameterized queries.
  • Performance-first: Minimal overhead compared to ORM abstractions; direct ADO.NET-style execution where appropriate.
  • Use Case: Build fast read paths for reporting dashboards or read-model projections.

Quick Start

Install and reference Dapper in your project, configure an ISqlConnectionFactory to create connections, and start building query handlers that leverage the provided templates for common read patterns.

Frequently Asked Questions about dapper-query-builder

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

FAQPage Schema
How do I build high-performance read queries with Dapper in .NET?

High-performance Dapper read queries are built using parameterized SQL, multi-mapping, and dynamic filtering to efficiently retrieve data into DTOs with minimal overhead for reporting and analytics dashboards.

What is the best way to map complex joined results to DTOs using Dapper?

Multi-mapping in Dapper allows you to join and map complex database results directly to multiple DTOs efficiently, eliminating boilerplate data access code while maintaining precise control over SQL execution and result projection.

How do I implement safe pagination and dynamic filtering in Dapper?

Safe pagination and dynamic filtering in Dapper are implemented through parameterized SQL queries, ensuring page-based data retrieval prevents SQL injection while securely handling variable filter inputs for read-model projections.

Do I need a specific connection handler to use Dapper for read queries?

Yes, you need to configure an ISqlConnectionFactory to create secure database connections, which provides safe connection handling for executing parameterized Dapper read queries in your .NET applications.

When should I use Dapper instead of an ORM for data retrieval?

Use Dapper for data retrieval when you need performance-first read paths with minimal overhead compared to ORM abstractions, enabling direct ADO.NET-style execution for fast reporting dashboards and read-model projections.

Can I use this Dapper query approach for analytics dashboards in .NET?

Yes, this Dapper query approach applies specifically to high-performance read scenarios in .NET, enabling fast data retrieval layers and read-model projections for reporting dashboards and analytics.

Related Skills