Show / Hide Table of Contents

Class DbQueryBuilder

Builds database query which can be translated to native SQL.

Inheritance
System.Object
DbQueryBuilder
DbAggregateQueryBuilder
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: DevZest.Data
Assembly: DevZest.Data.dll
Syntax
public class DbQueryBuilder

Properties

Name Description
Fetch

Gets a value specifies how many rows to return in the query result.

FromClause

Gets the SQL FROM clause.

Offset

Gets a value specifies how many rows to skip within the query result.

OrderByList

Gets the SQL ORDER BY list.

SelectList

Gets a list of selected column mappings.

WhereExpression

Gets the SQL WHERE expression.

Methods

Name Description
AutoSelect()

Constructs SQL SELECT by automatically matching columns.

AutoSelect(Model, Projection)

Constructs SQL SELECT by automatically matching columns between specified source model and target projection.

CrossJoin<T>(DbSet<T>, out T)

Constructs SQL CROSS JOIN.

From<T>(DbSet<T>, out T)

Constructs SQL FROM clause.

InnerJoin<T, TKey>(DbSet<T>, TKey, out T)

Constructs SQL INNER JOIN.

InnerJoin<T, TKey>(DbSet<T>, TKey, Func<T, TKey>, out T)

Constructs SQL INNER JOIN.

LeftJoin<T, TKey>(DbSet<T>, TKey, out T)

Constructs SQL LEFT JOIN.

LeftJoin<T, TKey>(DbSet<T>, TKey, Func<T, TKey>, out T)

Constructs SQL LEFT JOIN.

OrderBy(ColumnSort[])

Constructs SQL ORDER BY.

OrderBy(Int32, Int32, ColumnSort[])

Constructs SQL ORDER BY with specified offset and fetch.

RightJoin<T, TKey>(DbSet<T>, TKey, out T)

Constructs SQL RIGHT JOIN.

RightJoin<T, TKey>(DbSet<T>, TKey, Func<T, TKey>, out T)

Constructs SQL RIGHT JOIN.

Select<T>(T, T)

Constructs SQL SELECT by matching between specified source column and target column.

Select<T>(T, Adhoc, String)

Constructs SQL SELECT by matching between specified source column and target new adhoc column.

UnsafeSelect(Column, Column)

Constructs SQL SELECT by matching between specified source column and target column, without type safety.

Where(_Boolean)

Constructs SQL WHERE.

  • Improve this Doc
  • View Source
Back to top Copyright © Weifen Luo | DevZest