Tuesday, December 1, 2009

Discovering Best ORM Framework - DataObjects.Net 4

This month (November 2009) i am searching for some really good ORM framework for .NET.
My conditions was simple & clear:
  1. Easy to learn how specified ORM tool works
  2. Compatible with latest .NET framework (3.5)
    This means that ORM tool is using and supports latest language features like generics, linq, etc...
  3. Good startup tutorials and/or examples
  4. Useful documentation
  5. Support for LINQ queries
  6. Free for non-commercial usage + source code if possible
  7. Integration to Visual Studio (visual designer if possible)
I've read many articles, comparisons and others useful informations about bunch of ORM frameworks. But my high priority condition was point 5 (to support LINQ querying as much as possible).

At first my choice was NHibernate, pretty good stable framework with source code. Walk through all conditions points, each condition was +- good enough, but point 5 does not satisfied me, not at all. NHibernate does not works well with LINQ queries. You can check it at ORM BATTLE.NET, in LINQ Implementation Scorecard, where NHibernate was only 29.9 points out of 100. Yes, i know that it is first "first/initial" support of LINQ build into NHibernate, but in market, there are too many ORM tools with LINQ support much better than NHibernate has. Then started to think i have no other choice, only to start using LINQ 2 SQL (from Microsoft).

Sun is shining...within the site (orm battle net) i found ORM tool called DataObjects.Net 4. Its scorecard has 100 points in LINQ support. Interesting! I must test it before i made final choice.

Lets have a look at my conditions against DataObjects.Net 4:
  1. Easy to learn how specified ORM tool works
    - Take a look at wiki web site of DataObjects.NET 4
    - Simple page How it works - it shows you how to work with DO4 in first touch, too many unknown features there, but you can imagine how it works (as page title says)
    - Another page Manual - which is some kind of on-line help, but much better, good reading for new users of DO4 (like me) - comprehensive information how DO4 works and what you must know to use all advantages of this great ORM tool (authors makes good job with this manual, even if it is not completed now)
  2. Compabitle with latest .NET framework (3.5)
    - This is completely true, even examples are made upon NET 3.5
    - WCF Data Services (ADO.NET Data Services/Astoria) working example with Silverligth client
  3. Good startup tutorials and/or examples
    - Wiki page Step-by-step guide to DataObjects.Net v4.0 - section Getting started - when you walk through this tutorial, download and run attached examples, then you have really good start-point to use DO4 in your own project(s) !
  4. Useful documentation
    - This is the only weak part of DO4, just Class Reference without really useful descriptions and/or examples within specified classes, objects, etc...
    - But i've heard that guys are hard working on better help
  5. Support for LINQ queries
    - Nothing to say, ITS PURE DIAMOND (proved in ORM BATTLE.NET)
    - Wiki page LINQ (Language Integrated Query) - describing LINQ queries against DataObjects.Net
    - In the latest version added new feature called "subquery batching" - for more information read New feature of DataObjects.Net v4.1: subquery batching
  6. Free for non-commercial usage
    - DataObjects.Net is distributed under GPL v3 license for free, more information - GPL license
    - Source code is hosted on "google code", more information - Building DataObjects.Net from source code
  7. Integration to Visual Studio (visual designer if possible)
    - There are installed project templates (C#): DO Model Project, DO Console Application, DO Web Application, DO WPF Application, DO Unit Tests. Each project type has setup required references to installed DataObjects.Net assemblies
    - In current version there is no visual designer support, but they starting to implement this - Visual tools: model designer & profiler
And if you still does not have enought information, you can visit these sites:
  • DataObjects.Net Team Blog - useful collected informations about all stuff according to DataObjects.Net framework
  • Alex Yakunin's blog - most active blogging developer i seen last few years :-) All articles have comprehensive information how to work with DO4


  1. Thanks Peter - am interested in what issues and wins you find when using DataObjects.net. Considering using it for a future project.

  2. Hi there,
    I just discovering DO4 too for me current project. I using DO4 about month and i'm happy user of it. LINQ support is brilliant, its not just an word, it is reality. 1 thing i mostly like is upgrade schema, i can control upgrade process when some schema was changed in new version. Lets say when i rename old column 'Name' to 'NewName' then i have full control what to do with valus within this column, etc... you know what i mean. I think this is an 1st big issue which DO4 have and with which feature like project cannot work without it.