Location > Blog

Posts in nHibernate Category

Network-related or instance-specific error occurred while establishing a connection to SQL Server

I have a website getting occasional database disconnections throwing the error - A network-related or instance-specific error occurred while establishing a connection to SQL Server. Its been difficult locating the cause of the error as there appears to be nothing wrong. I have the same code running multiple websites and only one of the sites is plagued by the error so I figure it must be some configuration problem either with IIS or the MS SQL database.

Problems Migrating MSSQL to MySQL with NHibernate

Today I tried migrating my current project from using MSSQL Server to use MySQL Server. Theoretically this should be easy because my project uses NHibernate. As long as the structure of the MySQL database is the same as the MSSQL database I should be able to just change the NHibernate configuration

NHibernate vs OpenAccess ORM from Telerik

You have so many options when it comes to choosing a ORM these days. My personal favorite is nHibernate I have been using nHibernate for a few years now and I find it flexible really easy to use and has a growing community of users. Saying that I'm always on the lookout for something new which is where OpenAcess ORM form Telerik comes in, I use the Telerik RadControls for ASP.NET AJAX on some projects.I have always found it a good practice to minimize the number different 3rd party control vendors in an application. You usually have less problems integrating the controls and have a more consistent product.

NHibernate IQuery using a DTO class import mapping

As I had demonstrated in my previous post NHibernate SetResultTransformer and DTO using ICriteria to select across multiple classes or entities is straight forward. At the time I got stuck on how to do this using the IQuery interface and HQL, for some queries I find HQL is more flexible.

NHibernate SetResultTransformer and DTO

Lately I have been exploring NHibernate and ICriteria. NHibernate is great I would recommend it to anyone but often I find the documentation and examples are hard to follow. NHibernate SetResultTransformer combined with the generic list make returning a typed list from a complicated query really easy.

Problem with ICriteria when you want to order by a group using SqlGroupProjection

I wanted to do something that is fairly straight forward in plain SQL which was to order a query by one of the grouped columns.

1 - 6 of 6Records/Page Go to page: 1