Invalid image

WildFire



var queryBuilder = new QueryBuilder();
var t0 = new Table()
{
TableName = "Table0",
TableAlias = "t0"
};
var t1 = new Table()
{
TableName = "Table1",
Column1Name = "Column1",
Column2Name = "Column2",
JoinType = JoinType.Inner,
TableAlias = "t2"
};
////Create table from first table
//var tables = new List();
//tables.Add(t1);
//// Perform a join
//t0.JoinOn(tables);
queryBuilder.AddTable(t0);
////there are two ways you can add predicate either by string or predicate object
var textMatchExpression = new Predicate("t1.[Column3] like 'Joe'");
////AddPredicate also takes just string if you have only one where condition.
queryBuilder.AddPredicate(textMatchExpression, OperationType.And);
var datesExpressions1 = new List();
datesExpressions1.Add("f.[Column5] >= '2015-09-01'");
datesExpressions1.Add("f.[Column6] <= '2015-12-31'");
var dateExpressions2 = new List();
dateExpressions2.Add("f.[Column7] >= '2015-10-01'");
dateExpressions2.Add("f.[Column8] >= '2015-12-31'");
//add groups of predicates
queryBuilder.AddPredicate(datesExpressions1, OperationType.And, OperationType.Or);
queryBuilder.AddPredicate(dateExpressions2, OperationType.And, OperationType.Empty);
//Order by
queryBuilder.Query.OrderBy("Column1", true);
//Fetch overloaded with offset and number of rows.
queryBuilder.Query.FetchNext("2","20");
queryBuilder.GenerateQuery();.

Info

Version: 1.0.11
Author(s): Riju Vashisht, Chris Shum
Last Update: Tuesday, September 22, 2015
.NET Fiddle:
Project Url: https://github.com/optimus4me/WildFire
NuGet Url: https://www.nuget.org/packages/WildFire


Install
Install-Package WildFire
dotnet add package Z.EntityFramework.Plus.EF6
paket add WildFire
WildFire Download (Unzip the "nupkg" after downloading)



Tags






STATS

must-have-score


avg-downloads-per-day

2


days-since-last-release

815