When I learn for EntityFramwork4.1 and start with CodeFirst,I wanna to know that does it support Enum Type in POCO,and I also write some code in OnModelCreating method and using FluentAPI such as
modelBuilder.Entity<Merchant>().Property(m => m.MerchantType)
.HasColumnName("MerchantType")
.HasColumnType("int")
.IsRequired();
here is my POCO code :
public class Merchant
{
public int ID { get; set; }
public string Name { get; set; }
public MerchantType MerchantType { get; set; }
}
public enum MerchantType
{
Saler=0,Provider=1
}
but when Generate my database ,there is no column auto generated in the table. so I wanna to know does it support Enum Type and how could I generate the right mapping ?