I am creating an ASP.NET Core Web API.
I want a post body like:
{
"Name": "XYX",
"Status":"Waiting"
}
Status is an Enum:
public enum Status
{
[Description("Waiting")]
Waiting = 1,
[Description("Occuring")]
Occuring = 2,
[Description("Stopping")]
Stopping = 3,
}
What should I do so I that I don't get the error:
The JSON value could not be converted to PostgreSql.Enums.StatusEnum. Path:
P.S.: Tried what's mentioned here but it didn't work for me.