This is my Model Class where we have a Type which could be a Zombie or Human
public class User
{
public int ID { get; set; }
public string Name { ge
Explicit enum to string conversions would make your code messy and you'd have to keep parsing values. The same goes for lookup tables. Just add [Column] attribute to your enum field and specify TypeName as nvarchar (for SQL) or varchar (for postgres). Worked for me like a charm.
In your case, for example :
public class User
{
public int ID { get; set; }
public string Name { get; set; }
[Column(TypeName = "nvarchar(20)")]
public Type Type { get; set; }
public List WeposInList { get; set; }
}
You can read more about it in the official documentation here