NHibernate Spatial brings the spatial capabilities of several relational databases to the NHibernate API. In this recipe, I'll show you how to use NHibernate Spatial with Microsoft SQL Server 2008 to query for a geographic region containing a point.
In SQL Server 2008 Express, create a new, blank database named Spatial.
Inside the solution directory, create a directory named SpatialData.
Download the Shapefile containing all 50 states, D.C. and Puerto Rico from the United States Census website at http://www.census.gov/geo/www/cob/st2000.html or from the code download for this book. The file is named st99_d00_shp.zip.