Commit adf39686 authored by Joseph Daigle's avatar Joseph Daigle

fix for https://github.com/StackExchange/dapper-dot-net/issues/203

check to see if enumerable is null before access
parent c840cc2e
......@@ -2705,6 +2705,8 @@ public static void PackListParameters(IDbCommand command, string namePrefix, obj
var count = 0;
bool isString = value is IEnumerable<string>;
bool isDbString = value is IEnumerable<DbString>;
if (list != null)
{
foreach (var item in list)
{
count++;
......@@ -2729,6 +2731,7 @@ public static void PackListParameters(IDbCommand command, string namePrefix, obj
command.Parameters.Add(listParam);
}
}
}
var regexIncludingUnknown = @"([?@:]" + Regex.Escape(namePrefix) + @")(?!\w)(\s+(?i)unknown(?-i))?";
if (count == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment