ServiceStack version 4.5.14
It is my understanding that Enum will be stored as varchar(max).
I see that the table generated from the code first class is correctly reflected of each other.
What I do not see is the storage of the Enum property value.
The trimmed down class:
[Alias( "NonJobEvents" )]
public sealed class NonJobEvent
{
[AutoIncrement]
public int Id { get; set; }
public Enum EventType { get; set; }
}
The excluded properties of the above class get properly stored in the database. Setting JsConfig.TreatEnumAsInteger = true makes no difference in the resulting output. The EventType property column is always NULL.
The EventType property gets set to values from a third party API, each enum value is assigned an integer. e.g. var e = new NonJobEvent { EventType = TrackingEvent.Login };
I’m looking for insight as to what I may not be seeing or doing.