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:
- 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
- Why I’m using a Micro-ORM? by Schotime the creator of PetaPoco. http://is.gd/g5c9Ff