I have a private constructor that does following
Code:
private Invoice()
{
OnAfterCreate();
_lineItems = new Bag<billing.LineItem>();
lineItems.ItemAdded += new EventHandler<CollectionChangedEventArgs<billing.LineItem>>(lineItems_ItemAdded);
lineItems.ItemRemoved += new EventHandler<CollectionChangedEventArgs<billing.LineItem>>(lineItems_ItemRemoved);
}
but when I am debugging I do not see this constructor being called at all by NH. It loads invoices, and everything is there but this constructor never gets call, or at least I am not seeing it in debug mode. Also, collection does not have event handlers attached (I created my own IUserCollectionType and PresistentBag implementation, and that works fine).
So what is going on here?