ronnythedev/dotnet-clean-architecture-skills/19-dotnet-dapper-query-builder
Claude Code and agent skill by ronnythedev/dotnet-clean-architecture-skills
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Generates optimized read queries using Dapper. Includes multi-mapping for joins, pagination, dynamic filtering, CTEs, and best practices for high-performance data access.
Install
npx vskill@latest install ronnythedev/dotnet-clean-architecture-skills/19-dotnet-dapper-query-builderSKILL.md
Dapper Query Builder
Overview
Dapper provides lightweight, high-performance data access:
- Raw SQL - Full control over queries
- Multi-mapping - Handle complex joins
- Parameterized queries - SQL injection protection
- Minimal overhead - Near ADO.NET performance
Quick Reference
| Method | Purpose | Use Case | |
|---|---|---|---|
QueryAsync<T> | Multiple rows | Lists, reports | |
QueryFirstOrDefaultAsync<T> | Single row | Get by ID | |
QueryMultipleAsync | Multiple result sets | Complex data | |
ExecuteAsync | No results | Insert/Update/Delete | |
ExecuteScalarAsync<T> | Single value | Count, exists |
Template: Basic Query Handler
Template: Multi-Mapping (One-to-Many)
Template: Paginated Query with Filtering
Template: CTE (Common Table Expression)
Template: SQL Connection Factory
Column Mapping (Snake Case → PascalCase)
Critical Rules
- Always use parameters - Never concatenate user input
- Use `using` for connections - Proper disposal
- Alias columns to match DTOs -
AS PropertyName - Multi-mapping for joins - Avoid N+1 queries
- CTEs for complex logic - More readable than nested queries
- OFFSET/FETCH for pagination - Standard SQL pagination
- ILIKE for case-insensitive - PostgreSQL specific
- Return DTOs not entities - Query projections only
Related Skills
dotnet-cqrs-query-generator- Query handler structuredotnet-repository-pattern- EF Core for writesdotnet-clean-architecture- Application layer
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/19-dotnet-dapper-query-builder/SKILL.md
Popularity
- Repository stars
- 64
- Repository forks
- 11
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ronnythedev/dotnet-clean-architecture-skills/19-dotnet-dapper-query-builder)