I have no idea what ISessionBase is. I can't find anything with that name in NH3 or NH4.
Is the ISessionBase you have really coming from the NHibernate assembly? If it is, what version? Could it be a locally compiled (and modified) version? /Oskar 2016-08-10 21:50 GMT+01:00 Steve Lyle <[email protected]>: > > I inherited a project that has been around for a few years. > The project utilizes a Domain/Interface/Dao model in ASP.NET. > > ----- > The Dao executes numerous queries using ICriteria such as: > ICriteria criteria = NHibernateSessionManager.Insta > nce.GetSession().CreateCriteria(typeof(MyEntity)); > criteria.Add(Expression.Eq("id", id)); > return criteria.UniqueResult<MyEntity>(); > ----- > > > I'm trying to execute a sproc using a Named Query. > For numerous reasons I like to do so in this fashion: > ------ > using (ISession ses = NHibernateISession.OpenSession()) > { > IQuery qry = ses.GetNamedQuery("MySproc"); > qry.SetParameter("param1", param1); > qry.UniqueResult(); > ----- > > > How do I get session from SessionManager when GetSession() returns > ISessionBase? > or > How do I execute a named query from an ISessionBase? > > > > NHibernateSessionManager doesn't have a method that returns a ISession. > NHibernateSessionManager is in a separate "Core" project which I am > probably not going to be able to touch. > All projects are wired together via Spring. > > > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/nhusers. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
