if the entity as
public class AddressDetail
{
public string Country{get;set;}
}
public class Order
{
public AddressDetail AddressDetail{get;set;}
}
How ignore the Oreder.AddressDetail.Country property by Fluent API Not [NotMap]?
I found the solution for EF6,but I don't know Why Before EF6 have the function,EF6 don't have the function?
For EF5 and older: In the
DbContext.OnModelCreatingoverride for your context:
modelBuilder.Entity<Product>().Ignore(p => p.AddressDetails.Country);
For EF6: You're out of luck. See Mrchief's answer.
