How C# Strings Silently Kill Your SQL Server Indexes in Dapper
Summary
The article identifies a subtle performance trap in Dapper where passing a C# string to a varchar column causes implicit conversion to nvarchar, preventing index usage and dramatically increasing CPU and latency. It explains how to fix the issue by explicitly sending varchar parameters using DynamicParameters and DbType.AnsiString (or DbString), and provides guidance on auditing queries and understanding execution plans to prevent regressions.