Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Edited Feature: Support nested types (important for F#) [119]

$
0
0
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();
}
}
}

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>