diff --git a/Dapper/SqlMapper.cs b/Dapper/SqlMapper.cs index ee49c2abd..b8a8cd29e 100644 --- a/Dapper/SqlMapper.cs +++ b/Dapper/SqlMapper.cs @@ -367,7 +367,7 @@ public static void SetDbType(IDataParameter parameter, object value) handler = null; var nullUnderlyingType = Nullable.GetUnderlyingType(type); if (nullUnderlyingType != null) type = nullUnderlyingType; - if (type.IsEnum && !typeMap.ContainsKey(type)) + if (type.IsEnum && !typeMap.ContainsKey(type) && !typeHandlers.ContainsKey(type)) { type = Enum.GetUnderlyingType(type); }