If you have a Linq Expresssion (such as a reference to a variable in the closure) or really any other self-contained fragment, you can easily evaluate it by turning it into a lambda expression. For example, I was trying to evaluate the content of a variable that was showing up as a ".x" field. To do so, I did the following:
Saturday, December 4, 2010
NHibernate 3.0.GA has been released! It has all sorts of goodies like QueryOver, logging abstraction, and tons more. It also now has a built-in LINQ provider. Unfortunately, the LINQ provider is still in a beta state. Many queries work (as evidenced by the hundreds of working unit tests), but there are also still many queries it has trouble with. If you'd like to help accelerate the development of the LINQ provider (or any other part of NH for that matter), here's what you can do:
- File issues when you find bugs. http://jira.nhforge.org/
- Vote for issues. Popularity is difficult to gauge if we don't hear back from people.
- Provide test cases for those issues. A complete test case is easier to digest than a tiny code fragment without context. If the test can be used directly, the team member working on the issue can spend more of their time making improvements instead of trying to recreate a test.
- If you're feeling ambitious, dig into the source code and try to work out a fix.
There's a great article on making tests for NHibernate here. I've also included some different steps that might help you out.
With your help, we will work towards a rock solid LINQ release that matches the tremendous power and reliability already provided by the NHibernate platform.
- Check out the trunk using something like TortoiseSVN (https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/trunk/nhibernate)
- Use ShowBuildMenu.bat to create the AssemblyInfo.cs files.
- Load up NHibernate.Everything.sln in Visual Studio.
- Create a test with the issue number in the NHSpecificTest folder of the NHibernate.Test project (NH2392 is a fairly simple example to copy from).
- Use ShowBuildMenu.bat to see how to set up your database connection and run all the tests.
- Create a patch (TortoiseSVN can help you with this) and attach it to the JIRA issue.
Posted by Patrick Earl at 4:18 PM