I have problem with EF7 RC1 (EFCore). I am unable to work with enums in my model. I can save enum property. The value is casted to int. My problem is that during data reading i get invalid cast exception.
- Does EF7 support enum properties ?
- How can i configure it with fluent api ?
Thanks
EDIT:
enum:
public enum LimitMode
{
Max,
Min,
MaxAndMin,
}
Model:
public class SomeModel
{
(..)
public LimitMode LimitMode {get; set;}
}
ModelBuilder for SomeModel:
modelBuilder.Entity<SomeModel>(entity => {
(...)
entity.Property(p => p.LimitMode);
})