How to map an enumerator using EntityTypeConfiguration of Entity Framework 6?

3

Good evening, I have my next class

public class Endereco {
    public string Bairro { get; set; }
    public string Cidade { get; set; }
    public EUF Estado { get; set; }
}

and my enumerator

public enum EUF {
    SP = 1,
    PR = 2,
    SC = 3
}

and my mapping class

public EnderecoConfig : EntityTypeConfiguration<Endereco> {
    public EnderecoConfig() {
        Property(x => x.Cidade);
    }
}

How do I map this Enum using EntityTypeConfiguration?

I'm used to FLUENT NHIBERNATE where we use CustomType<EUF>()

    
asked by anonymous 17.04.2014 / 00:32

1 answer

1

Well, after a few searches and everything, I have the following answer:

Nothing, no configuration needed.

Just use Property(x => x.Estado);

    
17.04.2014 / 01:20