Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 759 Bytes

README.md

File metadata and controls

31 lines (24 loc) · 759 Bytes

QBuild

A C# library to easily build parameterized SQL queries

What it supports

  1. Building parameterized queries
  2. Lambda expressions
  3. Custom column/table name mapping
  4. Custom function mapping

What QBuild is NOT for

  1. Executing queries, use plain IDbCommand.Execute* methods or something else.
  2. Object mapping. Use something like Dapper

Code snippets

LambdaQueryBuilder builder = new LambdaQueryBuilder();
IClause clause = builder
    .Select<Product>(product => product.Name)
    .From<Product>()
    .OrderByDesc<Product>(product => product.Name)
    .Build();

Produces

select Name from Product order by Name desc

More use cases can be found in UnitTest project