I have a class Product
and a complex type AddressDetails
public class Product
{
public Guid Id { get; set; }
public AddressDetails AddressDetails { get; set; }
}
public class AddressDetails
{
public string City { get; set; }
public string Country { get; set; }
// other properties
}
Is it possible to prevent mapping "Country" property from AddressDetails
inside Product
class? (because i will never need it for Product
class)
Something like this
Property(p => p.AddressDetails.Country).Ignore();
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…