User-2027985085 posted
I've got an enum declared like so:
public enum MyEnum
{
Black=-1,
Red=0,
Green=1,
Blue=2
}
The numeric values are stored in a database.
My problem is that on the client side (proxy auto generated code) the enum no longer has the non-default values assigned. Therefore it effectively becomes:
public enum MyEnum
{ Black=0,
Red=1,
Green=2,
Blue=3 }
But the value that actually travels across the http wire is the numeric! So all the values become misinterpreted(!!!!)
I need the database to record numeric, and either the proxy code to retain the non-default values, or for the http to pass the labels instead of the values.
Any tips much appreciated.
Kind Regards
Martin