One of the awesome capabilities of NHibernate is its 1st and 2nd level caching functionality. Each time a query is submitted for execution NHibernate first looks in the cache for the entity before taking the query to the database and selecting the data. There is a lot of terminology you need to know before you […]
Read More →Category: Open Source
Using NuGet to install your ORM into Visual Studio
I have spent a lot of time Working with NHibernate 3.0 and now am also giving some attention to the Entity Framework. One of the road blocks for using NHibernate is the initial configuration requirements. There are a significant number of actions which must be taken to get NHibernate working, where as, the Entity Framework […]
Read More →LINQ generated NHibernate and Entity Framework SQL
One of my favorite aspects of ORMs is that I no longer have to write SQL. I like this because I was never really good at it once it exceeded the joining of 2 tables. The really complicated queries I left with the SQL people or a DBA. Nonetheless, I still wanted to look at […]
Read More →NHibernate MappingException could not compile mapping document
This is a fairly common error message which a programmer will receive during the NHibernate mapping process. The inner exception was: {“persistent class NAMESPACE.CLASSNAME, NAMESPACE not found”} {“Could not compile the mapping document: NAMESPACE.CLASSNAME.hbm.xml”} The root cause of this error was that the class (class.cs) existed in the NAMESPACE.Common namespace and in my mapping file […]
Read More →NHibernate connection driver must be specified in the configuration section
I was in the process of pointing my NHibernate to an Oracle 10g instance using ODP.Net and I received the below error message: The connection.driver_class must be specified in the NHibernate configuration section. I had been using a locally installed Microsoft SQL Server database up to that point. It turns out that I needed to […]
Read More →NHibernate and Entity Framework essentials using a Model First approach
Object Relational Mapping technologies have been around for many years. Hibernate was one of the first, if not the first, ORM library which targeted the Java platform. Today, there are also NHibernate, which is a port of Hibernate to C# and the ADO.NET Entity Framework. Being a huge fan of the concept I am passionate […]
Read More →NHibernate and Entity Framework
Prior to getting my job here at Microsoft, I was, and in many aspects still am passionate about NHibernate. I discovered a particular liking to ORM’s in general. I liked it so much that I wrote a book called “Working with NHibernate 3.0” which is available on Amazon or from the Wrox.com website. What I […]
Read More →