Micro-ORMs War: Dapper vs. Massive vs. PetaPoco

After reading about Massive Rob Conery’s micro-ORM I found there’re more than one out there, and Scott Hanselman had one episode of Hanselminutes about Sam Saffron Dapper and Rob Conery Massive, But after listening to the podcast I start searching about Micro-ORMs and what is the best Dapper or Massive?

Massive is using C# 4.0 dynamic feature "create object on fly" so  you lose the strongly typed POCOs, but has Insert/Update/Delete methods , and Dapper optimized for speed to help Stackoverflow.com, work against strongly typed POCO’s, good for querying data but no Insert/Update/Delete methods you must write your DML SQL statements. And here comes PetaPoco the one has the best feature of them as they claim:

PetaPoco is a tiny, fast, single-file micro-ORM for .NET and Mono.

  • Like Massive it’s a single file that you easily add to any project
  • Unlike Massive it works with strongly typed POCO‘s
  • Like Massive, it now also supports dynamic Expandos too – read more
  • Like ActiveRecord, it supports a close relationship between object and database table
  • Like SubSonic, it supports generation of poco classes with T4 templates
  • Like Dapper, it’s fast because it uses dynamic method generation (MSIL) to assign column values to properties

I tried it and very satisfied, it has well formatted documentation and blog posts, and I made my mind to use it in my future project.

Update: Articles talki about Micro-ORMs and ORMs:

  1. When should you use NHibernate? by Ayende Rahien the one of creator of NHibernate please read this post and its comments. http://is.gd/3ZMlrj
  2. Why I’m using a Micro-ORM? by Schotime the creator of PetaPoco. http://is.gd/g5c9Ff
Tagged on: ,
  • http://twitter.com/AmrEldib Amr Eldib

    Could you tell us more on Micro-ORMs. Why would I learn to use another ORM and not just one that I already know (Entity framework or NH, for example).

    • Anonymous

      Micro-ORM is a small piece of ORM, it’s like ORM but without its fancy/complex features. Why would you learn another ORM? first the learning curve of Micro-ORM is shorter than ORM and if you know how to use ORM, you’ll sure know how to use Micro-ORM. It’s small library helps you to perform CRUD in your application without the headache of setup the ORM such as NHibernate.

    • Anonymous

      Read this blog post http://schotime.net/blog/index.php/2011/05/04/petapoco-why-im-using-a-micro-orm/ I was written by the creator of PetaPoco