EF Code First prevent property mapping with Fluent API

后端 未结 7 1249
鱼传尺愫
鱼传尺愫 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:08

    It can be done in Fluent API as well, just add in the mapping the following code

    this.Ignore(t => t.Country), tested in EF6

提交回复
热议问题