Dapper.TypedParameters 1.0.0 Lets Developers Declare Explicit SQL Server Parameter Types
A new open-source library called Dapper.TypedParameters has reached its first stable release, version 1.0.0, targeting .NET developers who use the Dapper micro-ORM with SQL Server. The library addresses a subtle gap between .NET CLR types and SQL Server's more specific type system, which includes distinctions such as varchar versus nvarchar and varying column sizes. Without explicit type declarations, Dapper delegates parameter metadata to the ADO.NET provider, which can sometimes lead to implicit type conversions in SQL Server depending on schema definitions. Dapper.TypedParameters allows developers to annotate query parameters with precise SQL metadata — for example, SqlParam.VarChar(value, 11) — when the database schema contract is already known. The library does not attempt to inspect the database or recommend one SQL type over another; it simply gives developers a way to make their intent explicit when they choose to do so.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in