This item was migrated from the DevDiv work item tracking system [ID=171798].
We should also support nested complex and enum types, like in the following snippet from a customer:
using System.Data.Entity;
namespace EnumTest
{
public class Car
{
public enum CarMake
{
Ferrari,
Ford
}
public int Id { get; set; }
public CarMake Make { get; set; }
}
public class MyContext : DbContext
{
public DbSet<Car> Cars { get; set; }
}
class Program
{
static void Main(string[] args)
{
MyContext context = new MyContext();
context.Cars.Add(new Car());
context.SaveChanges();
}
}
}
We should also support nested complex and enum types, like in the following snippet from a customer:
using System.Data.Entity;
namespace EnumTest
{
public class Car
{
public enum CarMake
{
Ferrari,
Ford
}
public int Id { get; set; }
public CarMake Make { get; set; }
}
public class MyContext : DbContext
{
public DbSet<Car> Cars { get; set; }
}
class Program
{
static void Main(string[] args)
{
MyContext context = new MyContext();
context.Cars.Add(new Car());
context.SaveChanges();
}
}
}