dapper

1 article
sort: new top best
clear filter
0 8/10

C# strings default to nvarchar(4000) in Dapper's parameter binding, causing implicit conversions on varchar columns that prevent SQL Server from using indexes and force full table scans instead of index seeks. The fix is to explicitly use DbType.AnsiString with DynamicParameters to match the column type and restore index performance.

Dapper SQL Server DbType.AnsiString DbString DynamicParameters CONVERT_IMPLICIT Query Store
consultwithgriff.com · PretzelFisch · 7 days ago · details · hn