Dear experts.

I have a design problem here, which is not really linked to NH but
more to the way C# works.

I work on a classical 3 layer application, Data layer (with NH),
Business layer, and UI Layer.

I don't want to couple the UI layer to the Data layer but I have the
following situation that enforces me to add a reference to the
NHibernate dll in the UI project.

I have nh mapped class that travel from the data layer to the ui
layer, and vice versa. So all 3 layer need to reference the project
containing those objects in order to manipulate them.

Here is the problem. One of my mapped nhibernate domain object class
implements ILifecycle in order to hook up life cycle events. Let's
call this class myDomainObject.
Because the UI displays that object, C# requires that the UI project
"knows about" the ILifecycle interface, that is to say, I must add a
reference to NH in the UI project.

Indeed C# does not support private inheritance as C++.

Question. Is that ok ? Is the design poor ?

Thanks.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to