I\'m using EF Core with database-first approach using the \"Scaffold-DbContext\"-command to generate my DbContext / Entities.
How can I instruct Scaffold-DbContext t
Try this solution:
public enum StateEnum { Ok = 1, Fail = 2 } public partial class Foo { public int Id { get; set; } public int StateId { get; set; } public StateEnum State { get => (StateEnum)StateId; set => StateId = (int)value; } }