Where should Nhibernate IPostInsertEventListener go in the 3 tier architecture

Posted by Quintin Par on Stack Overflow See other posts from Stack Overflow or by Quintin Par
Published on 2010-04-25T16:09:05Z Indexed on 2010/04/25 16:13 UTC
Read the original article Hit count: 348

I have a IPostInsertEventListener implementation like

public class NHibernateEventListener : IPostInsertEventListener, IPostUpdateEventListener

which catches some entity inserts and does an additional insert to another table for ETL.

Essentially it requires references to the Nhibernate, Domain entity and Repository<>

Now where do I go about adding this class? If I add it to ApplicationServices I’ll end up referencing Nhibernate at that layer. If I add this to the Data layer, I’ll have to reference Domain (circular).

How do I go implementing this class with S#arp principles? Any thoughts?

© Stack Overflow or respective owner

Related posts about s#arp-architecture

    Related posts about 3-tier