How to map a Collection in NHibernate?

前端 未结 2 1684
忘了有多久
忘了有多久 2021-02-10 20:28

I have a class Contact (base class),a class called Customer and a class called Supplier. Customer and supplier class both derive from Contact.

Customer has a 0..n relat

2条回答
  •  梦毁少年i
    2021-02-10 21:00

    Another solution if you don't like to use the set from Iesi collections

    public class Customer  : Contact
    {
       public ICollection Orders
       {
          get; private set;
    
       }
    }
    

    And the mapping like this:

    
       
       
         
         
         
       
    
    

提交回复
热议问题