Skip to content
Adam O'Neil edited this page Dec 14, 2019 · 22 revisions

Why Dapper.QX?

I know that inline SQL is a divisive topic. I love and use Linq to objects often, but have never enjoyed Linq to Entities because I don't like how it handles dynamic criteria, its strange outer join syntax, and the complications around debugging and working with generated SQL.

At the same time, it's true that thoughtless use of inline SQL makes code brittle and complicated. With this in mind, I created Dapper.QX as both a productivity layer and testing framework for inline SQL. I based it on Dapper since it handles low-level query execution and mapping of results to CLR types really well.

Productivity in query applications means having a good way to handle dynamic predicates. Dapper.QX makes it easy to mix and match criteria in a type-safe and concise syntax that uses ordinary C# object literals. Dapper.QX does not use lambdas nor generate any SQL apart from using AND to join the terms of your WHERE clauses. This way, you can use any SQL feature supported by your platform, and not be surprised by mysterious generated SQL nor limited to expressions that support Linq translation.

Clone this wiki locally