public static object ChangeTypeForDefaultValue(object value, Type type, IFormatProvider formatProvider)
{
if (type == typeof(System.Numerics.BigInteger))
{
if ((DBNull.Value == value) || (null == value)) { return DBNull.Value; }
return BigIntegerStorage.ConvertToBigInteger(value, formatProvider);
}
else if (value is System.Numerics.BigInteger)
{
return BigIntegerStorage.ConvertFromBigInteger((System.Numerics.BigInteger)value, type, formatProvider);
}
return ChangeType2(value, DataStorage.GetStorageType(type), type, formatProvider);
}