Skip to content

Commit b2b716d

Browse files
committed
Add support for Array return value (i.e.: QueryAsync<int[]>))
1 parent 0561b61 commit b2b716d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dapper/SqlMapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ private static Func<IDataReader, object> GetDeserializer(Type type, IDataReader
17951795
return GetDapperRowDeserializer(reader, startBound, length, returnNullIfFirstMissing);
17961796
}
17971797
Type underlyingType = null;
1798-
if (!(typeMap.ContainsKey(type) || type.IsEnum || type.FullName == LinqBinary
1798+
if (!(typeMap.ContainsKey(type) || type.IsEnum || type.IsArray || type.FullName == LinqBinary
17991799
|| (type.IsValueType && (underlyingType = Nullable.GetUnderlyingType(type)) != null && underlyingType.IsEnum)))
18001800
{
18011801
if (typeHandlers.TryGetValue(type, out ITypeHandler handler))

0 commit comments

Comments
 (0)