Azure Table Storage, WCF Service and Enum

后端 未结 6 977
故里飘歌
故里飘歌 2021-02-19 09:00

Here\'s my problem. A class which defines an order has a property called PaymentStatus, which is an enum defined like so:

    public en         


        
6条回答
  •  借酒劲吻你
    2021-02-19 09:17

    Just suggestions...

    I remember that in WCF you have to mark enums with special attributes: http://msdn.microsoft.com/en-us/library/aa347875.aspx

    Also, when you declare PaymentStatuses? PaymentStatus, you are declaring Nullable PaymentStatus. The ? sintax is just syntactic sugar. Try to remove the ? and see what happen (you could add a PaymentStatuses.NoSet = 0 , because the default value for an Int32 is 0).

    Good luck.

提交回复
热议问题