Skip to main content

SelectQueryFluentBuilder.SelectRecordsCount(String) Method

Extends a query’s result set with a column that specifies the row count in the requested table or, if there are groups in the table, - the rows count in each group.

Namespace: DevExpress.DataAccess.Sql

Assembly: DevExpress.DataAccess.v22.2.dll

NuGet Package: DevExpress.DataAccess


public SelectQueryFluentBuilder SelectRecordsCount(
    string alias


Name Type Description
alias String

A String value specifying an alias to be used for the result set’s column.


Type Description

A SelectQueryFluentBuilder object that can be used to further configure the SELECT statement.


The following code demonstrates how to use the SelectRecordsCount method to select the record count in a table:

using DevExpress.DataAccess.Sql;
// ...  
private SqlDataSource BindToData() {
    var sqlDataSource = new SqlDataSource();
    var query = SelectQueryFluentBuilder

    sqlDataSource .Queries.Add(query);
    sqlDataSource .Fill();
See Also