From c1a35eec7ad4142b67003205ac1961289eaddfb3 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Feb 2026 08:13:43 +0100 Subject: [PATCH] Document AddParameter overload resolution best practice --- docs/ado-net-extensions.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/ado-net-extensions.md b/docs/ado-net-extensions.md index 258e786..f3686cc 100644 --- a/docs/ado-net-extensions.md +++ b/docs/ado-net-extensions.md @@ -50,6 +50,13 @@ Single parameter helpers: Advanced overloads support explicit `ParameterDirection`, `DbType`, `size`, `precision`, `scale`. +Compatibility note on overload resolution: + +- Best practice is to cast value arguments to `object` when calling `AddParameter(...)` with value payloads. +- Alternatively, use named arguments to force the intended overload. +- This avoids accidental binding to a different overload in ambiguous cases. +- Current overload shape is preserved for backward compatibility. + Example: ```csharp