Business enum to DatContract Enum conversion in WCF

Posted by chugh97 on Stack Overflow See other posts from Stack Overflow or by chugh97
Published on 2010-03-18T14:19:15Z Indexed on 2010/03/18 14:21 UTC
Read the original article Hit count: 727

Filed under:
|
|
|

I have an enum

namespace Business
{
    public enum Color
   {
       Red,Green,Blue
    }
}


namespace DataContract
{
   [DataContract] 
   public enum Color
   {
       [EnumMember]
       Red,
       [EnumMember]
       Green,
       [EnumMember]
       Blue
    }
}

I have the same enum as a datacontract in WCF with same values. I need to convert the Business enum to the DataContract enum using a translator.

Hoe can I achieve this?

© Stack Overflow or respective owner

Related posts about wcf

Related posts about datacontracts