Dapper vs Petapoco - Easy data access in ASP.NET 4.5 Web Application

asp.net dapper orm petapoco

Question

I want to use an ORM with my new ASP.NET 4.5 project. I am developing my project with Visual Studio 2012. I want to know what are the advantages of using various ORM products, including the following:

  1. Entity Framework (seems the slowest)
  2. Dapper (seems the most popular one)
  3. Petapoco

What I like about Petapoco is that it has the T4 template generator file that automatically read the tables from my MySQL database and create the needed classes. This means when I make a change in the schema, I can just save this file again and it will update the object models.

I've read the two documentations but still can't understand what are the major differences between the two. Furthermore, I wanted to know if in Visual Studio 2012 Entity Framework has bee updated to offer better performance and features so I know if it's a viable option.

I also want a support multi-mapping, which I can use something like this:

 Post.Authords.First_Name
  • returns the first name for a single post by id, The 'First_Name' appears in another table, the authors table.

  • other ORM frameworks recommendations is welcomed.

Accepted Answer

I'm a PetaPoco user, so maybe I got some Dapper facts wrong or dated

PetaPoco advantages over Dapper:

  • Handle Typed and Dynamic types
  • Allows saving/updating/Deleting an object (Dapper only fetch and map, but I know there is an extension that allow it)
  • Multi-mapping


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why