SelectExpressionCollection Class

A collection of objects that define columns in the SELECT statement.

Namespace: DevExpress.DataAccess.DataFederation

Assembly: DevExpress.DataAccess.v20.1.dll

Declaration

public class SelectExpressionCollection :
    List<ISelectExpression>
Public Class SelectExpressionCollection
    Inherits List(Of ISelectExpression)

Related API Members

The following members accept/return SelectExpressionCollection objects:

Remarks

The SelectNode.Expressions property provides access to the SelectExpressionCollection instance.

Examples

This code snippet demonstrates how to create a federated data source that uses a filter with a parameter.

NOTE

The complete sample project How to Create a Federated Data Source at Runtime is available in the DevExpress Examples repository.

using DevExpress.DataAccess.DataFederation;
// ...
    FederationDataSource federation = new FederationDataSource();

    Source source = new Source("excelSource", CreateExcelDataSource("SalesPerson.xlsx", "Data"));

    var sourceNode = new SourceNode(source, "Orders");

    var query = new SelectNode(sourceNode)
    {
        Alias = "excel",
        Expressions = {
                new SelectColumnExpression(sourceNode, "OrderID"),
                new SelectColumnExpression(sourceNode, "OrderDate"),
                new SelectColumnExpression(sourceNode, "Sales Person"),
                new SelectColumnExpression(sourceNode, "ProductName"),
                new SelectColumnExpression(sourceNode, "Extended Price")
            },
        FilterString = "[Orders.CategoryName] = ?cat",
    };
    federation.Queries.Add(query);
    federation.Fill(new[] { 
        new DevExpress.DataAccess.Sql.QueryParameter("cat", typeof(string), "Seafood") });

Inheritance

Object
List<ISelectExpression>
SelectExpressionCollection
See Also