SelectQueryFluentBuilder.Join(String, SqlJoinType, RelationColumnInfo[]) Method
In This Article
Joins two tables. Allows you to specify the join operation type and columns relations by which the tables should be joined.
Namespace: DevExpress.DataAccess.Sql
Assembly: DevExpress.DataAccess.v24.2.dll
NuGet Package: DevExpress.DataAccess
#Declaration
public SelectQueryFluentBuilder Join(
string tableName,
SqlJoinType joinType,
params RelationColumnInfo[] keyColumns
)
#Parameters
Name | Type | Description |
---|---|---|
table |
String | The name of the table with which the current table of the query builder should be joined. |
join |
Sql |
The join operation type. |
key |
Relation |
An array of column relations. |
#Returns
Type | Description |
---|---|
Select |
A query builder that contains the join operation result. |
#Example
using DevExpress.DataAccess.Sql;
// ...
var query = SelectQueryFluentBuilder
.AddTable("Customers")
.SelectColumns("ContactName", "City")
.Join(tableName: "Employees",
joinType: SqlJoinType.Inner,
keyColumns: new[] {
new RelationColumnInfo(
parentKeyColumn: "City",
nestedKeyColumn: "City",
conditionType: ConditionType.NotEqual),
new RelationColumnInfo(
parentKeyColumn: "Region",
nestedKeyColumn: "Region"
)})
.Build("Customers");
See Also