Hi I need to save a single enum in my context, I tryed this:
public class Context : DbContext
{
public Context() : base("name=Context"){}
MyEnum MyEnum { get; set; }
public DbSet<Object1> Objects{ get; set; }
}
, when I modify MyEnum it changes its value but after saving changes when I want to use it goes back to the enum of value 0. Heres my modification code:
MyEnum example = MyEnum.Value1;
using (var ctx = new Context())
{
ctx.CriterioPlanificacion = example;
ctx.SaveChanges();
}