Using enumeration for SVC service in C#
It takes me a whole day to try this...
Using SVC service as web service and passing enumeration data type needs: [DataContract], [EnumMember] and [ServiceKnownType(typeof(MyEnum))]
ex.
Using SVC service as web service and passing enumeration data type needs: [DataContract], [EnumMember] and [ServiceKnownType(typeof(MyEnum))]
ex.
[DataContract]
public enum ResultCode
{
[EnumMember]
Success = 200,
[EnumMember]
System_Error = 500
}
[OperationContract]
[ServiceKnownType(typeof(ResultCode))]
ActionResult<ResultCode> Process();
留言