How do you map an entity -> interface relationship using Fluent NHibernate?

后端 未结 4 1146
太阳男子
太阳男子 2021-01-05 07:38

given the following class definition:

public class Order {
  public IProduct Product {get;set;}
}

I have this (fluent) mapping



        
4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-05 08:31

    Try mapping the interface IProduct instead of the concrete class Product. (Note, I'm not talking about mapping the Product field of class Order.)

提交回复
热议问题