I am new to NHiberate. I searched on this topic but could not seem to find an answer.
Basically I have an existing .NET C# web application which is using NHibernate.dll version 1.2.0.3002. I am using Visual Studio 2010. If I use framework 3.5, the web applications retrieives the data from the database and no errors. But I need to convert this web app to framework 4.0. If I do that and then run the app. I get an error on a query using NHibernate. The attached file gives the error message.
The Lines of code:
IQuery query = NHibernateSession.CreateQuery("from Borrower where RUSBorrowerId = :RUSBorrowerId");
query.SetString("RUSBorrowerId", borrowerId);
log.Error("Debug-before-List<Borrower> list = new List<Borrower>(query.List<Borrower>())");
List<Borrower> list = new List<Borrower>(query.List<Borrower>()); // the line where it errors out
Does NHibernate 1.2.0.3002 work with .NET Framework 4.0? Or do I need to upgrade to a newer version of NHIbernate? If so, what version? Or do I need to just make some code changes to get it to work?
What versions of NHIbernate work with the different versions of .NET Framework?