diff --git a/CryptoExchange.Net/SharedApis/Models/ExchangeParameters.cs b/CryptoExchange.Net/SharedApis/Models/ExchangeParameters.cs index 8023bca..8b715d5 100644 --- a/CryptoExchange.Net/SharedApis/Models/ExchangeParameters.cs +++ b/CryptoExchange.Net/SharedApis/Models/ExchangeParameters.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Data.Common; using System.Linq; namespace CryptoExchange.Net.SharedApis @@ -99,6 +100,9 @@ namespace CryptoExchange.Net.SharedApis if (val == null) return default; + if (val.Value is T typeVal) + return typeVal; + try { Type t = Nullable.GetUnderlyingType(typeof(T)) ?? typeof(T);