Hi there,
On 9.4.2, we're getting this:
System.ArgumentException: Must specify valid information for parsing in the string. at System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument) at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult) at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase) at Dynamicweb.Ecommerce.Orders.OrderRepository.ExtractOrder(IDataReader reader) at Dynamicweb.Ecommerce.Orders.OrderRepository.GetCustomerOrdersByType(Int32 customerId, String shopIds, OrderType orderType, Int32
Seems like this is the code that causes it:
If Database.ColumnExists(reader, "OrderShippingCountrySelection") Then
shippingSelection = DirectCast([Enum].Parse(GetType(CountrySelectionForMethod), Converter.ToString(reader("OrderShippingCountrySelection"))), CountrySelectionForMethod)
End If
If Database.ColumnExists(reader, "OrderPaymentCountrySelection") Then
paymentSelection = DirectCast([Enum].Parse(GetType(CountrySelectionForMethod), Converter.ToString(reader("OrderPaymentCountrySelection"))), CountrySelectionForMethod)
End If
Should that really be just Database.ColumnExists? What about null values?
Is there a way to solve this? Should I update the database with fake values for these columns?
Thanks!