0

In dapper I can get data with

Query<Person>("sql condition").

and I can do with dapper extensions

GetList<Person>(predicate) 

Both return an IEnumerable

Which approach should I choose for which situation?

As the extensions library is newer it seems to me that the author did not like building sql

conditions with strings. Instead I have a bit of intellisense and strong typing the

condition.

But is that all the advantage? Are there disadvantages you are aware of due to experience

in using both libraries?

Elisabeth
  • 20,496
  • 52
  • 200
  • 321

1 Answers1

0

The DapperExtension is there to help with the simple task of CRUD against a single table. If you need more then Query is the way to handle this. Admittedly SELECT is not as useful as it is a single table, but it has simplified many of the write operations.

Thad
  • 1,518
  • 2
  • 21
  • 37