TsSoft.Dapper.QueryBuilder Library lets to build sql queries for Dapper in a declarative manner by using criteria classes with attributes applied to thier properties Nuget reference http://www.nuget.org/packages/TsSoft.Dapper.QueryBuilder/