是否可以从exclude a property到owned entity type?
modelBuilder.Entity<Order>().OwnsOne(
o => o.ShippingAddress,
sa =>
{
sa.Property(p => p.Street).Ignore(); //doesn't compile
});
答案 0 :(得分:0)
modelBuilder.Entity<Order>().OwnsOne(
o => o.ShippingAddress,
sa =>
{
//sa.Property(p => p.Street).Ignore(); //doesn't compile
sa.Ignore(p => p.Street); //this works ?
});