daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NHibernate POCO modelling instances creating other instances
  2. public class Order: BaseEntity
  3. {
  4.    public virtual Customer Customer {get; set;}
  5.  
  6.    public Order(Customer customer)
  7.    {
  8.     ...
  9.    }
  10. }
  11.  
  12. public class Customer: BaseEntity
  13. {
  14.    public virtual string Name {get; set;}
  15.  
  16.    public virtual Order CreateOrder()
  17.    {
  18.       return new Order(this);
  19.    }
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top