EF Code First prevent property mapping with Fluent API

后端 未结 7 1254
鱼传尺愫
鱼传尺愫 2020-12-29 20:42

I have a class Product and a complex type AddressDetails

public class Product
{
    public Guid Id { get; set; }

    public Addres         


        
7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-29 21:01

    Try this

    modelBuilder.ComplexType().Ignore(p => p.Country);
    

    It worked for me in similar case.

提交回复
热议问题