Introduction
Introduction to the usage of NHibernate
Today the third part of my series on NHibernate and Fluent NHibernate went live. It took a little bit longer due to work overload. You can read it here. Summary In part 3 of this article series about NHibernate and Fluent NHibernate I have discussed how to let Fluent NHibernate automatically map a domain model to a data model. We have realized that FNH provides a reasonable mapping out of the box by using default conventions. I have shown how one can implement user defined conventions which will influence how the mapping is defined on a very fine...
Today the second part of my series on NHibernate and Fluent NHibernate went live. You can read it here.
Summary
In part 2 of the article series I have continued to implement the remaining part of the domain which I had introduced in the first part. I discuss the mapping of various forms of relations between different entities. For all mappings I have presented the code needed to verify the mappings.
In part 3 of the article series I’ll show how one can further refactor and improve the mapping of the domain model. I’ll then discuss the usage of conventions and...
Sorry for having been quiet such a long time. But I was really busy lately. I wrote several articles for journals and other non NHibernate related posts. But now the good news for all of you who like my tutorial like posts...
I have been invited to write a series of articles on NHibernate and Fluent NHibernate on http://dotnetslackers.com.
The first part of this series has just been published. I invite you to read it here.
In this series I start from grounds up and will explain to the readers how easy it has become to write an NHibernate based application...
Introduction The Castle ActiveRecord project is an implementation of the ActiveRecord pattern for .NET. The ActiveRecord pattern consists on instance properties representing a record in the database, instance methods acting on that specific record and static methods acting on all records. Castle ActiveRecord is built on top of NHibernate, but its attribute-based mapping free the developer of writing XML for database-to-object mapping, which is needed when using NHibernate directly. You can find the home page of the Castle project here. How will we use it? My intent is not to implement the ActiveRecord pattern...
Introduction In this post I'll present a possible setup for a .NET solution which respects (as much as possible) the following aspects, patterns and software engineering practices Continuous Integration (CI) Deploy often (--> see Agile development) Domain Driven Design (DDD) Test Driven Development (TDD) Separation of Concern (SoC) In most of the samples presented in this blog I'll adhere to this kind of solution setup (e.g. here and here)! The solution should have as few...
In a previous article I showed how to setup a developer machine to start using NHibernate as an ORM tool during the development of an application. I advocated a domain driven design (DDD) approach and a test driven development (TDD) style. This is the second article in a series of introductory chapters.
Define the Domain
Lets start by defining a very simple domain. For the moment it consists of one entity called Product. The product has 3 properties Name, Category and Discontinued.
Add a folder Domain to the FirstSample project of your solution. Add a new class Product.cs to this folder. The...
In this post (and a subsequent one) I'll introduce two ways how to prepare a developer machine to use NHibernate as a ORM (Object Relational Modeling) tool.
The first approach describes the minimal setup needed to use NHibernate when developing an application. The second approach on the other hand describes an infrastructure which is not only based on NHibernate but also on another very useful framework called Rhino Tools. This framework simplifies the usage of NHibernate very much but is by no means required. I personally have successfully developed medium sized and large customer projects based on latter kind of setup.
In...