diff --git a/src/Dapper.AOT.Analyzers/Internal/Inspection.cs b/src/Dapper.AOT.Analyzers/Internal/Inspection.cs index 8a0ee6da..449c9fa4 100644 --- a/src/Dapper.AOT.Analyzers/Internal/Inspection.cs +++ b/src/Dapper.AOT.Analyzers/Internal/Inspection.cs @@ -479,6 +479,11 @@ private static bool IsCollectionType(ITypeSymbol? parameterType, out ITypeSymbol if (parameterType.IsArray()) { elementType = parameterType.GetContainingTypeSymbol(); + if (elementType?.SpecialType == SpecialType.System_Byte) + { + elementType = null; + return false; + } if (getCastType) castType = elementType.GetTypeDisplayName() + "[]"; return true; }