dapper-data-access

Review Dapper data access code in .NET for security and best practices.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/jamesbondev/ai-dotfiles --skill dapper-data-access-jamesbondev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dapper-data-access
Source: https://github.com/jamesbondev/ai-dotfiles/tree/main/.github/skills/dapper-data-access
Command: npx skills add https://github.com/jamesbondev/ai-dotfiles --skill dapper-data-access-jamesbondev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers write, review, and debug Dapper data access code in .NET applications, ensuring security, performance, and adherence to best practices.

Core Features & Use Cases

  • SQL Injection Prevention: Identifies and guides against vulnerabilities from string concatenation.
  • Connection Management: Enforces proper disposal and configuration of database connections.
  • Stored Procedure Handling: Provides patterns for calling stored procedures with parameters and output values.
  • Resilience & Auditability: Ensures correct handling of monetary types, audit columns, and concurrency.
  • Use Case: Review a C# repository method that uses Dapper to fetch user data, ensuring it uses parameterized queries, proper connection disposal, and includes a CancellationToken.

Quick Start

Review the provided C# code snippet for Dapper data access, focusing on security and best practices.

Frequently Asked Questions about dapper-data-access

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

FAQPage Schema
How do I prevent SQL injection when using Dapper in C#?

Prevent SQL injection in Dapper by using parameterized queries instead of string concatenation. This Skill reviews C# repository methods to identify vulnerabilities and enforces secure parameterization practices for all database interactions.

What is the best way to manage database connections in Dapper?

Manage Dapper database connections by ensuring proper disposal and lifecycle configuration. This Skill enforces correct connection disposal patterns and resilience best practices to prevent undisposed connections in .NET applications.

How do I execute stored procedures with Dapper and handle output values?

Execute stored procedures with Dapper by specifying the correct command type and handling parameters properly. This Skill provides patterns for calling stored procedures and managing their output values securely.

Does Dapper support CancellationToken for asynchronous database queries?

Dapper supports CancellationToken for asynchronous database queries to improve application responsiveness. This Skill reviews your data access code to ensure it properly includes and passes CancellationToken instances.

How do I handle transactions and type safety with Dapper in .NET?

Handle Dapper transactions and type safety by following resilience best practices for monetary types and audit columns. This Skill enforces correct transaction handling and type safety to prevent data concurrency issues.