I\'ve got the following model:
public enum Status
{
[Display(Name = \"Awaiting Approval\")]
AwaitingApproval,
Rejected,
Accepted,
}
I tried this and got the error type or namespace enum member could not be found...
So you guys might get this error too so you need to use
using System.Runtime.Serialization;
and still you get this error then add a reference like below:
Right click on your project -> Add -> Reference.. -> Assemblies -> Mark System.Runtime.Serialization (i have 4.0.0.0 version ) -> Ok
Now you can proceed like this:
[JsonConverter(typeof(StringEnumConverter))]
public enum Status
{
[EnumMember(Value = "Awaiting Approval")]
AwaitingApproval,
Rejected,
Accepted,
}