<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Managing your NHibernate Sessions</title> <atom:link href="http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/feed/" rel="self" type="application/rss+xml" /><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/</link> <description>inquisitive: adjective. given to inquiry, research, or asking questions; eager for knowledge; intellectually curious</description> <lastBuildDate>Sun, 20 May 2012 21:55:00 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: iniki</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-98642</link> <dc:creator>iniki</dc:creator> <pubDate>Fri, 11 Mar 2011 15:12:00 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-98642</guid> <description>Thanks Davy! Well explained :-)</description> <content:encoded><![CDATA[<p>Thanks Davy! Well explained <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-98630</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Thu, 10 Mar 2011 16:05:00 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-98630</guid> <description>already did :)
http://davybrion.com/blog/2010/05/why-you-shouldnt-expose-your-entities-through-your-services/</description> <content:encoded><![CDATA[<p>already did <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br
/> <a
href="http://davybrion.com/blog/2010/05/why-you-shouldnt-expose-your-entities-through-your-services/" rel="nofollow">http://davybrion.com/blog/2010/05/why-you-shouldnt-expose-your-entities-through-your-services/</a></p> ]]></content:encoded> </item> <item><title>By: iniki</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-98629</link> <dc:creator>iniki</dc:creator> <pubDate>Thu, 10 Mar 2011 15:59:00 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-98629</guid> <description>Hello Davy,Thanks for the post.I am using NH in WCF service library with all the domain entities taken care by NH, but all in one single library.
I saw you saying: &#039;Actually, WCF and NH don&#039;t even know about each other here, because i keep NHibernate contained behind the service layer.&#039; in one of the comments,
could you please explain this statement a little more? </description> <content:encoded><![CDATA[<p>Hello Davy,</p><p>Thanks for the post.</p><p>I am using NH in WCF service library with all the domain entities taken care by NH, but all in one single library.<br
/> I saw you saying: &#8216;Actually, WCF and NH don&#8217;t even know about each other here, because i keep NHibernate contained behind the service layer.&#8217; in one of the comments,<br
/> could you please explain this statement a little more?</p> ]]></content:encoded> </item> <item><title>By: Williamsburg</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-96512</link> <dc:creator>Williamsburg</dc:creator> <pubDate>Mon, 31 Jan 2011 05:51:00 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-96512</guid> <description>due to its frequent trips to database, the performance on the app can be affected. one of the option to enhance the performance and response time of N Hibernate app is the use of NHibernate Level2 cache.http://www.alachisoft.com/ncache/nhibernate_l2cache_index.html</description> <content:encoded><![CDATA[<p>due to its frequent trips to database, the performance on the app can be affected. one of the option to enhance the performance and response time of N Hibernate app is the use of NHibernate Level2 cache.</p><p><a
href="http://www.alachisoft.com/ncache/nhibernate_l2cache_index.html" rel="nofollow">http://www.alachisoft.com/ncache/nhibernate_l2cache_index.html</a></p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-23154</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Fri, 11 Dec 2009 10:02:25 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-23154</guid> <description>@Kurtyou&#039;re resolving your dependencies manually instead of having them injected... looking back on this post, i did the same thing in the example which i would no longer recommendi&#039;ll write a new post with an example that hopefully makes this clear... it&#039;ll be based on the NhRequestHandler that you&#039;ve already seen in another post though ;)</description> <content:encoded><![CDATA[<p>@Kurt</p><p>you&#8217;re resolving your dependencies manually instead of having them injected&#8230; looking back on this post, i did the same thing in the example which i would no longer recommend</p><p>i&#8217;ll write a new post with an example that hopefully makes this clear&#8230; it&#8217;ll be based on the NhRequestHandler that you&#8217;ve already seen in another post though <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: kurt schroeder</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-23153</link> <dc:creator>kurt schroeder</dc:creator> <pubDate>Thu, 10 Dec 2009 22:43:16 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-23153</guid> <description>yes i suppose that would help to know that. You&#039;d figure i&#039;d realize specifics are a bit important having worked a tech line at one point. Your patience on that one is appreciated.
Bear in mind that i&#039;m new to NH and may make some obvious mistakes. I can manage session, drawing upon a friends advise, in command objects by just ending the session with close. I&#039;m making all execute methods return an IResponse to be cast as the correct type. In this case a void would work, but for consistancy it will return an EmptyResponse(). In the case of a Collection, List, ... IResponse would be implimented a List, collection, ... I did not come up with that idea and don&#039;t want to take credit for thinking of it.public IResponse Execute()
{
var sessionProvider = IoC.Container.Resolve();
var junkRepository = IoC.Container.Resolve();
sessionProvider.StartSession();
junkRepository.Save(junk);
sessionProvider.EndSession();
return new EmptyResponse();
}In the repositories I&#039;m hoping that i can do something similar.public IEnumerable GetJunk()
{
var sessionProvider = IoC.Container.Resolve();
var queryString = &quot;select j from Junk j&quot;;
var query = sessionProvider.GetCurrentSession().CreateQuery(queryString);
query.SetResultTransformer(new DistinctRootEntityResultTransformer());
return query.List();
}The obvious problem i&#039;m having when i do this is the session not being handled correctly. Am I off base by using this at all in the repository and should just stick with command objects?
I&#039;m guessing this is where the UnitofWork could come in, but i&#039;m a little fuzzy on how to do this.I&#039;m up for an example because i have a lot of questions like this and others.</description> <content:encoded><![CDATA[<p>yes i suppose that would help to know that. You&#8217;d figure i&#8217;d realize specifics are a bit important having worked a tech line at one point. Your patience on that one is appreciated.<br
/> Bear in mind that i&#8217;m new to NH and may make some obvious mistakes. I can manage session, drawing upon a friends advise, in command objects by just ending the session with close. I&#8217;m making all execute methods return an IResponse to be cast as the correct type. In this case a void would work, but for consistancy it will return an EmptyResponse(). In the case of a Collection, List, &#8230; IResponse would be implimented a List, collection, &#8230; I did not come up with that idea and don&#8217;t want to take credit for thinking of it.</p><p> public IResponse Execute()<br
/> {<br
/> var sessionProvider = IoC.Container.Resolve();<br
/> var junkRepository = IoC.Container.Resolve();<br
/> sessionProvider.StartSession();<br
/> junkRepository.Save(junk);<br
/> sessionProvider.EndSession();<br
/> return new EmptyResponse();<br
/> }</p><p>In the repositories I&#8217;m hoping that i can do something similar.</p><p> public IEnumerable GetJunk()<br
/> {<br
/> var sessionProvider = IoC.Container.Resolve();<br
/> var queryString = &#8220;select j from Junk j&#8221;;<br
/> var query = sessionProvider.GetCurrentSession().CreateQuery(queryString);<br
/> query.SetResultTransformer(new DistinctRootEntityResultTransformer());<br
/> return query.List();<br
/> }</p><p>The obvious problem i&#8217;m having when i do this is the session not being handled correctly. Am I off base by using this at all in the repository and should just stick with command objects?<br
/> I&#8217;m guessing this is where the UnitofWork could come in, but i&#8217;m a little fuzzy on how to do this.</p><p>I&#8217;m up for an example because i have a lot of questions like this and others.</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-23152</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Thu, 10 Dec 2009 21:43:22 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-23152</guid> <description>@kurtwhat kind of example do you want?</description> <content:encoded><![CDATA[<p>@kurt</p><p>what kind of example do you want?</p> ]]></content:encoded> </item> <item><title>By: kurt schroeder</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-23151</link> <dc:creator>kurt schroeder</dc:creator> <pubDate>Thu, 10 Dec 2009 21:40:13 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-23151</guid> <description>I have to say thanks, not just for this article, but for all the others. I noticed a request for an example just curious if you ever got around to one. I&#039;m still a bit new to NHibernate and DI, IoC, .. I get unsure of what should go where. These articles have helped a lot.</description> <content:encoded><![CDATA[<p>I have to say thanks, not just for this article, but for all the others. I noticed a request for an example just curious if you ever got around to one. I&#8217;m still a bit new to NHibernate and DI, IoC, .. I get unsure of what should go where. These articles have helped a lot.</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-23114</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Mon, 07 Dec 2009 15:14:48 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-23114</guid> <description>I almost never resolve components manuallyAgatha resolves the request handler for the current request, and that request handler simply declares all the dependencies that it needs to handle the request.  Agatha automatically releases the resolved request handler, and the request handler disposes of its dependencies</description> <content:encoded><![CDATA[<p>I almost never resolve components manually</p><p>Agatha resolves the request handler for the current request, and that request handler simply declares all the dependencies that it needs to handle the request.  Agatha automatically releases the resolved request handler, and the request handler disposes of its dependencies</p> ]]></content:encoded> </item> <item><title>By: Morten Jacobsen</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-23113</link> <dc:creator>Morten Jacobsen</dc:creator> <pubDate>Mon, 07 Dec 2009 15:04:04 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-23113</guid> <description>Great post.. I am learning a lot about keeping code loosely coupled.. I have a question though.. How would you do it if you had to insert or update the values instead of reading them? Would you do something akin to the following?public void InsertCategory(ProductCategoryDTO dto)
{
using(var uow = Container.Resolve())
{
using (ITransaction transaction = uow.CreateTransaction())
{
try
{
var pc = CreateProductCategoryFromDto(dto);
var repository = Container.Resolve();
repository.SaveOrUpdate(pc);
transaction.Commit();
}
catch(SomeException e)
{
transaction.Rollback();
}
}
}
}Or do you have a better/more elegant way?Thanks in advance,
Morten Jacobsen</description> <content:encoded><![CDATA[<p>Great post.. I am learning a lot about keeping code loosely coupled.. I have a question though.. How would you do it if you had to insert or update the values instead of reading them? Would you do something akin to the following?</p><p>public void InsertCategory(ProductCategoryDTO dto)<br
/> {<br
/> using(var uow = Container.Resolve())<br
/> {<br
/> using (ITransaction transaction = uow.CreateTransaction())<br
/> {<br
/> try<br
/> {<br
/> var pc = CreateProductCategoryFromDto(dto);<br
/> var repository = Container.Resolve();<br
/> repository.SaveOrUpdate(pc);<br
/> transaction.Commit();<br
/> }<br
/> catch(SomeException e)<br
/> {<br
/> transaction.Rollback();<br
/> }<br
/> }<br
/> }<br
/> }</p><p>Or do you have a better/more elegant way?</p><p>Thanks in advance,<br
/> Morten Jacobsen</p> ]]></content:encoded> </item> <item><title>By: lemycanh</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-21552</link> <dc:creator>lemycanh</dc:creator> <pubDate>Wed, 01 Jul 2009 17:26:45 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-21552</guid> <description>I had google and google... nhibernate session management for winform, finaly, i found your article, this&#039;s a great article, thanks alot!
(sorry for my poor english :D)</description> <content:encoded><![CDATA[<p>I had google and google&#8230; nhibernate session management for winform, finaly, i found your article, this&#8217;s a great article, thanks alot!<br
/> (sorry for my poor english <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> )</p> ]]></content:encoded> </item> <item><title>By: Ian Mckay</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-16815</link> <dc:creator>Ian Mckay</dc:creator> <pubDate>Mon, 25 May 2009 19:40:52 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-16815</guid> <description>Hi,I have found this article extremely useful. I just thought I&#039;d share one minor change I made. When injecting the IUnitOfWork from my controller, the session was being started even if my action was not using the database (because the constructor was being fired). It was then throwing an error on the next action to use the UoW because the previous session hadn&#039;t been disposed. I added an extra method to the IUnitOfWork:public interface IUnitOfWork : IDisposable
{
..
///
/// Starts the Unit of Work
///
/// Itself
IUnitOfWork Start();
}And moved the setActiveSession logic out of the constructor and into this method. Because it returns itself it can still be used in the using block.using (unitOfWork.Start())(Again, many thanks for the article. Keep up the good work. :)</description> <content:encoded><![CDATA[<p>Hi,</p><p>I have found this article extremely useful. I just thought I&#8217;d share one minor change I made. When injecting the IUnitOfWork from my controller, the session was being started even if my action was not using the database (because the constructor was being fired). It was then throwing an error on the next action to use the UoW because the previous session hadn&#8217;t been disposed. I added an extra method to the IUnitOfWork:</p><p> public interface IUnitOfWork : IDisposable<br
/> {<br
/> ..<br
/> ///<br
/> /// Starts the Unit of Work<br
/> ///<br
/> /// Itself<br
/> IUnitOfWork Start();<br
/> }</p><p>And moved the setActiveSession logic out of the constructor and into this method. Because it returns itself it can still be used in the using block.</p><p> using (unitOfWork.Start())(</p><p>Again, many thanks for the article. Keep up the good work. <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-16720</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Mon, 25 May 2009 05:07:55 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-16720</guid> <description>@Ianthat service layer implementation is just some example code... in my real service layer, the IUnitOfWork instance is indeed injected instead of resolved manually</description> <content:encoded><![CDATA[<p>@Ian</p><p>that service layer implementation is just some example code&#8230; in my real service layer, the IUnitOfWork instance is indeed injected instead of resolved manually</p> ]]></content:encoded> </item> <item><title>By: Ian Mckay</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-16650</link> <dc:creator>Ian Mckay</dc:creator> <pubDate>Sun, 24 May 2009 20:34:26 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-16650</guid> <description>Hi,A quick question regarding your implementation of the service layer. Doesn&#039;t the explicit call to IoC container, Container.Resolve()
limit your testability. It would seem to make sense to pass in the UoW on the constructor.How do you test this?I like the use of the using statement however the only disadvantage I could see is if you wanted to chain service method calls. With each method call the UoW would dispose of the Session.Thanks,</description> <content:encoded><![CDATA[<p>Hi,</p><p>A quick question regarding your implementation of the service layer. Doesn&#8217;t the explicit call to IoC container, Container.Resolve()<br
/> limit your testability. It would seem to make sense to pass in the UoW on the constructor.</p><p>How do you test this?</p><p>I like the use of the using statement however the only disadvantage I could see is if you wanted to chain service method calls. With each method call the UoW would dispose of the Session.</p><p>Thanks,</p> ]]></content:encoded> </item> <item><title>By: Trevor Westerdahl</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-10854</link> <dc:creator>Trevor Westerdahl</dc:creator> <pubDate>Tue, 31 Mar 2009 02:48:57 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-10854</guid> <description>Arg! No example?I would love to see one simple example... how does one persuade you?</description> <content:encoded><![CDATA[<p>Arg! No example?</p><p>I would love to see one simple example&#8230; how does one persuade you?</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-10522</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Wed, 25 Mar 2009 19:17:21 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-10522</guid> <description>Not one that i can just give out right now, sorry</description> <content:encoded><![CDATA[<p>Not one that i can just give out right now, sorry</p> ]]></content:encoded> </item> <item><title>By: Kris-I</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-10521</link> <dc:creator>Kris-I</dc:creator> <pubDate>Wed, 25 Mar 2009 19:15:59 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-10521</guid> <description>Hello,You don&#039;t have a full example of this ? Thanks</description> <content:encoded><![CDATA[<p>Hello,</p><p>You don&#8217;t have a full example of this ? Thanks</p> ]]></content:encoded> </item> <item><title>By: Chuck</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-10105</link> <dc:creator>Chuck</dc:creator> <pubDate>Thu, 19 Mar 2009 10:15:10 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-10105</guid> <description>Davy -Thanks! I think that is steering me in the right direction. I am trying to learn how to apply several patterns (IOC, DI, etc) all at once while learning a new ORM AND trying to do it all in the web. This learning seems steep.C</description> <content:encoded><![CDATA[<p>Davy &#8211;</p><p>Thanks! I think that is steering me in the right direction. I am trying to learn how to apply several patterns (IOC, DI, etc) all at once while learning a new ORM AND trying to do it all in the web. This learning seems steep.</p><p>C</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-10098</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Thu, 19 Mar 2009 07:01:55 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-10098</guid> <description>i&#039;m not sure if i understand what exactly it is that you&#039;re asking but i&#039;ll give it a shot anyways:every class that needs request-scoped state would talk to something that implements IRequestState, but they would never know the specific type of the actual implementation. So, if you have another assembly which contains only your businesslayer (and no reference to System.Web), then you should have classes which need request-state depend on an IRequestState instance.At runtime, the container will inject AspNetRequestState into each class which has a dependency on IRequestState, but none of those classes will even know that they are talking with AspNetRequestState.  Since the business assembly is running within the ASP.NET context, your AspNetRequestState can do anything it wants with the current HttpContext.  Or, if the business assembly is running in a different context (in a WCF service for instance) then the container would be configured to inject WcfRequestState.  None of the classes that need request-state would know anything about either AspNetRequestState or WcfRequestState though... they just know IRequestStateHope that answers your question :)</description> <content:encoded><![CDATA[<p>i&#8217;m not sure if i understand what exactly it is that you&#8217;re asking but i&#8217;ll give it a shot anyways:</p><p>every class that needs request-scoped state would talk to something that implements IRequestState, but they would never know the specific type of the actual implementation. So, if you have another assembly which contains only your businesslayer (and no reference to System.Web), then you should have classes which need request-state depend on an IRequestState instance.</p><p>At runtime, the container will inject AspNetRequestState into each class which has a dependency on IRequestState, but none of those classes will even know that they are talking with AspNetRequestState.  Since the business assembly is running within the ASP.NET context, your AspNetRequestState can do anything it wants with the current HttpContext.  Or, if the business assembly is running in a different context (in a WCF service for instance) then the container would be configured to inject WcfRequestState.  None of the classes that need request-state would know anything about either AspNetRequestState or WcfRequestState though&#8230; they just know IRequestState</p><p>Hope that answers your question <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Chuck</title><link>http://davybrion.com/blog/2008/06/managing-your-nhibernate-sessions/comment-page-1/#comment-10084</link> <dc:creator>Chuck</dc:creator> <pubDate>Wed, 18 Mar 2009 21:54:37 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=149#comment-10084</guid> <description>Davy -I was trying to write a small Web App to try and put all of these pieces together. I have also implemented the ActiveSessionManager to use the IRequestState which I would pass in AspNetRequestState in the Constructor.So here is where I am getting lost.I am assuming that the &quot;GetAllProductCategories&quot; method (last bit of code in the post) would be in a seperate assembly from the web application.If the IOC Container is Resolving the UnitOfWork, but, it is not in the web application, how will the AspNetRequestState be able to pull the Nhibernate Session out of HTTPContext?ThanksChuck</description> <content:encoded><![CDATA[<p>Davy &#8211;</p><p>I was trying to write a small Web App to try and put all of these pieces together. I have also implemented the ActiveSessionManager to use the IRequestState which I would pass in AspNetRequestState in the Constructor.</p><p>So here is where I am getting lost.</p><p>I am assuming that the &#8220;GetAllProductCategories&#8221; method (last bit of code in the post) would be in a seperate assembly from the web application.</p><p>If the IOC Container is Resolving the UnitOfWork, but, it is not in the web application, how will the AspNetRequestState be able to pull the Nhibernate Session out of HTTPContext?</p><p>Thanks</p><p>Chuck</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/25 queries in 0.017 seconds using disk: basic
Object Caching 664/667 objects using disk: basic
Content Delivery Network via Amazon Web Services: CloudFront: d18sni7re4ly7f.cloudfront.net

Served from: davybrion.com @ 2012-05-21 11:58:20 -->
