http://fabiomaulo.blogspot.com/2009/10/nhibernate-wcf-session-per-call-in.html
On Wed, Sep 29, 2010 at 1:14 PM, jcomet <[email protected]> wrote: > I have been successfully using NHibernate in ASP.Net projects by > instantiating a SessionFactory as a static in global.asax, and > binding it via NHibernate.Context.CurrentSessionContext. I am trying > to use the same method in a WCF web service, but I keep getting "An > item with the same key has already been added" exceptions - caused by > the fact that it keeps trying to build a new session factory for each > service call (I think). WCF and silverlight are new to me, and I am > "learning by blog" and am lost. Many posts describe ways to transmit > domain objects down the wire, but I don't want to do that - I am using > DTOs. Many blog posts show injecting ISession in ways that are beyond > my current grasp. I really need a simple silverlight / wcf project > that shows how to manage the ISessionFactory and ISession in WCF > without a lot of window dressing. I am surprised at how much trouble > this is - at least for me. I am hopeful to get some guidance from > this group. > > Many thanks in advance. > > -- > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- Fabio Maulo -- 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.
