isession
Stumped: Custom NHibernate Session management gives "Specified cast is not valid" exception (C#)
I am trying to implement some proper NHibernate session management in my console application, but running into some very weird problems. One moment everything seems to be working fine, but randomly, a[详细]
2023-04-10 17:13 分类:问答NHibernate ISession.Save() - Why is this persisting my entities immediately?
I am creating a large number of entities with NHibernate, attaching them to my ISession, and then using a transaction to commit my changes to the database. Code sample is below:[详细]
2023-03-15 07:10 分类:问答nhibernate lazyload creates new isession
Can I prevent nhibernate creating new ISessions when lazy loading? How? Correction: I mean new IDbConnections. I have implemented my own DriverConn开发者_StackOverflowectionProvider and I see it gets[详细]
2023-02-16 04:42 分类:问答How to get NHibernate ISession to cache entity not retrieved by primary key
My \'user\' entity is almost always retrieved by username, rather than by its integer surrogate key. Beca开发者_StackOverflow社区use the username is not the primary key, this means that the ISession w[详细]
2023-02-14 15:20 分类:问答Where can I find documentation for NHibernate ISession.Persist()?
NHibernate\'s ISession exposes a method Persist() with two overloads. I cannot find documentation on this method anywhere. It\'s not even mentioned in the NHibernate reference material on http://nhibe[详细]
2023-02-05 16:57 分类:问答NHibernate is loading same object multiple times - please help!
I\'ve just been reading the trace for one of my ASP.NET pages and I\'ve noticed that the page user is being loaded from the database each time the user is required. Since each ISession is supposed to[详细]
2023-02-03 14:28 分类:问答How to Queue The Add Operation in NHibernate?
Is there some way to queue the \"Add\" operation in NHibernate, just like Linq to SQL and Entity Framework does?[详细]
2023-01-20 12:34 分类:问答IsessionFactory Issue
I am getting the classic \"object reference not set to an instance of a object\" error on this line HttpContext.Items[\"ISession\"] = Configure.GetSessionFactory().OpenSession();[详细]
2023-01-19 07:08 分类:问答About NHibernate's ISession
In this question, the user asks the better way to close sessions because he was having some errors. The most voted answer is Ayende\'s answer that says:[详细]
2023-01-18 09:47 分类:问答How to pass unit of work container into constructor of repository using dependency injection
I\'m trying to work out how to complete my implementation of the Repository pattern in an ASP.NET web application.[详细]
2023-01-08 07:55 分类:问答