1

For my IRepository, i would like:

  1. To have it be usable by a micro-orm like dapper, petapoco, massive etc... for the SPEED
  2. To have where clauses that get run on the server, hopefully using Expression/IQueryable style (which is also very swappable)

Is it possible to get both? How would you write an IRepository Where for micro orms? Are micro ORMs good for projects big enough to necessitate Repositories?

I need speed and swap-ability. Without a good where my repository pattern is worthless, right?

Micah
  • 10,295
  • 13
  • 66
  • 95
  • 1
    I'm not sure I understand you completely, however PetaPoco doesn't support a IQueryable/Linq where clause, however there is a number of mechanisms to support dynamic sql creation. – Schotime Dec 20 '11 at 12:08
  • All three support SQL, you can do a where in sql.. you could create an abstraction that results in sql that you pass to whatever microOrm you are using? – David McLean Feb 29 '12 at 10:24

1 Answers1

1

If you like things looking good like POCO classes, and also want speed of MicroORM, than you must check, ServiceStack OrmLite. Even you can use Massive or Dapper. Just a use of that will be different.

But one thing is for sure, Code will be less and speed is like anything. Do let me know if you need any code snippet. Just go through the github sites, that will help.

Trev
  • 1,358
  • 3
  • 16
  • 28
kunjee
  • 2,739
  • 1
  • 23
  • 38