I haven't worked with postsharp. and very little with aspecting. I do use an IoC to manage the session though. conceptually it looks like this. 1. register session factory into Container 2. begin request - resolve factory, open session, start transaction 3. resolve session from IoC container utlizing SessionFactory.GetCurrentSessionContext(), inject into controllers/ services 3. end request - commit/rollback transaction. dispose session
My IoC of choice is Castle.Windsor, but any will do. On Nov 9, 11:13 am, bstack <[email protected]> wrote: > Cheers for the response Jason. > > Looks like I will stick with what NH provides out of the box. However > I will try to abstract all of the NH session handling code into an > aspect e.g. PostSharp --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
