Skip to content

A C# library to easily build parameterized SQL queries

Notifications You must be signed in to change notification settings

benzenesoft/QBuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A C# library to easily build parameterized SQL queries

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages