The way we handle that was to make our Repository take in an ISession instead of the ISessionSource. Assuming that your IoC tool is set with the scoping correctly, we can simply consume the exact same ISession in another class that opens up special abilities.
I vote down on opening up ISession on IRepository. That's just not good design, or absolutely necessary. Jeremy D. Miller The Shade Tree Developer jeremydmil...@yahoo.com ________________________________ From: Stuart Campbell <stuart.campbe...@gmail.com> To: fluent-nhibernate@googlegroups.com Sent: Sunday, January 11, 2009 1:53:38 PM Subject: [fluent-nhib] Repository Hi, I was wondering how many people are using FluentNHibernate.Framework.Repository in anger and if so, how you are handling custom queries. The reason I ask is because I'm deriving from Repository but finding that sometimes I need to use the ISession and it isn't really exposed. My repositories are injected with an ISessionSource and that doesn't expose the ISession either. So for now I have just made Repository._session protected in my FNH working copy. Would it be a good idea to make this change (or similar) in the trunk? Stu --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibernate@googlegroups.com To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---