From ec57d85ece08cb1b959520ed6e8076dfddccbb84 Mon Sep 17 00:00:00 2001 From: Mauro Cerutti Date: Tue, 17 Dec 2013 14:33:37 +0100 Subject: [PATCH] Fixed crash with DbString parameter list on Oracle --- Dapper NET40/SqlMapper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dapper NET40/SqlMapper.cs b/Dapper NET40/SqlMapper.cs index 24c78f6d8..307aac5d4 100644 --- a/Dapper NET40/SqlMapper.cs +++ b/Dapper NET40/SqlMapper.cs @@ -1789,7 +1789,6 @@ public static void PackListParameters(IDbCommand command, string namePrefix, obj count++; var listParam = command.CreateParameter(); listParam.ParameterName = namePrefix + count; - listParam.Value = item ?? DBNull.Value; if (isString) { listParam.Size = 4000; @@ -1805,6 +1804,7 @@ public static void PackListParameters(IDbCommand command, string namePrefix, obj } else { + listParam.Value = item ?? DBNull.Value; command.Parameters.Add(listParam); } } @@ -3610,4 +3610,4 @@ public partial class FeatureSupport #endif -} \ No newline at end of file +}