August 2008 Entries

A fluent interface to NHibernate - Part 4 - Configuration

This is the fourth post in a series of articles where I want to analyze and describe the new upcoming mapping interface providing a fluent interface to NHibernate for the mapping of a domain model to the underlying database. The previous post are A fluent interface to NHibernate A fluent interface to NHibernate - Part 2 - Value Objects A fluent interface to NHibernate - Part 3 - Mapping Relations Configuration In NHibernate we traditionally had several methods how we could configure the database relevant parameters. These...

posted @ Monday, August 25, 2008 7:07 PM | Feedback (437)

A fluent interface to NHibernate - Part 3 - Mapping Relations

This is the third post in a series of articles where I want to analyze and describe the new upcoming mapping interface providing a fluent interface to NHibernate for the mapping of a domain model to the underlying database. The other posts are A fluent interface to NHibernate A fluent interface to NHibernate - Part 2 - Value Objects A fluent interface to NHibernate - Part 4 - Configuration You can get the source code of the solution accompanying this post here. In the time...

posted @ Friday, August 15, 2008 1:36 AM | Feedback (404)

A fluent interface to NHibernate - Part 2 - Value Objects

In my last post I introduced a new framework which gives you the possibilities to define the mappings of the entities to the underlying database in C# using a fluent interface instead of writing XML mapping files. This has caused some discussion in the community on the pros and cons of this approach. Let me repeat what the goals of this new framework are or should be reduce friction when mapping entities (and value objects) to the underlying database mapping should be more expressive than use of plain XML ...

posted @ Wednesday, August 13, 2008 11:04 AM | Feedback (464)

A fluent interface to NHibernate

Do you like NHibernate? Do you like XML? My answer would be yes for the former and no for the latter. But if you want to map your entities to the underlying database tables you have no other choice than use XML. Ok, you are right, we still have the possibility to use attributes for the mapping (e.g. by using Castle Active Record) but in this case we are "polluting" our nice domain objects with infrastructure related information which definitely does NOT belong into the domain model. Here comes our salvation. We now have a third player in the...

posted @ Monday, August 11, 2008 10:26 AM | Feedback (681)

Database Migration

In my last post I discussed the automated management of an SQL server database. In the post I used the Tarantino database migration tool. Ben Scheirman recently has written an excellent post about some other tools that are also available for doing the job. Where the Tarantino migration tool uses TSQL scripts to do the migrations most of the other tools define the DDL in C# or Ruby. For reference I put here the list of tools mentioned in Ben's post Rails Migrations running on SQL Server ...

posted @ Thursday, August 07, 2008 5:19 PM | Feedback (652)

Manage SQL Databases

Note: the following article is only targeting Microsoft SQL Server (I regret...). In a previous article I have discussed the schema generation and schema update offered by NHibernate. In this post I want to discuss a way how you can generate and/or maintain your SQL Server database. When practicing agile development one of the most important cornerstones of this methodology is implementing continuous integration (CI). That is any solution your team develops should be able to build in fully automated manner. One of the build steps is of course the creation and or update of the database and...

posted @ Monday, August 04, 2008 10:15 AM | Feedback (603)