Get rid of your xml – go Fluent NHibernate

Posted by Marcus Hammarberg on August 31, 2009

After my very short experience with NHibernate I have already come to realize that lots of problems can arise from and in the XML-files that contains the actual mapping instructions.

Just the fact that they are XML gives you the classical problem of no compile-time checking and the possibility of calling things differently in the code and configuration.

Well, here is the solution; Fluent NHibernate. Their solution is simple – do it in code, in a fluent interface-style.

I just ran through their starter example and I like it. A lot. And some of it is almost magic. A good way to “let the storage issues be a consequence of the domain model”

Published by Marcus Hammarberg on Last updated