ComplexType
DbUpdateExcetion
NULL
ModelValidationException
EntityType 'Attribute' has no key defined. Define the key for this EntityType. EntitySet 'Attributes' is based on type 'Attribute' that has no keys defined.
public class Item { public ID {set;get;} public Attribute[] Attributes {set;get;} } public class Attribute { public SomeComplexType misc1 {set; get;} public SomeComplexType misc2 {set; get;} } public class ItemDb : DbContext { public ItemDb(string connection) : base(connection) {} public DbSet<Item> Items { get; set; } protected override void OnModelCreating(DbModelBuilder builder) { // currently I am ignoring the Attributes builder.Ignore<Attributes>(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)