In this post we are going to search using ICriterion to filter and sort the results. The only pre-requisite is that you properly configure your nHibernate environment, and like all my other code samples, know c#. This one is pretty easy, first we are going to set the required references: Then we are going to [...]
There is a really cool jQuery tool (http://tablesorter.com/docs/index.html) that uses PFM Technology (Pure Freakin’ Magic) to make your html table just magically page and sort. It works great with MVC and nHibernate, but I wanted to get fancy and make my own. Turned out to be surprisingly easy. Here’s what I did: Preparing the Controller [...]
Below are two samples on how to create a query with ActiveRecord and ICriterion. Example 1: Select all contacts from Texas The Controller’s syntax would be this: Example 2: SQL style query The next part is where all the magic happens. The “SELECT” part is done for us automatically, so we simply add our WHERE [...]
How to create a custom query using NHibernate and ActiveRecord
How to configure your ASP.NET MVC project to harness the power of nHibernate and Castle ActiveRecord.