Gemstone Data Library
Show/Hide TOC

# TableOperations T QueryRecordCountAsync(CancellationToken, IRecordFilter) Method

Gets the record count for the modeled table based on search parameter. Search executed against fields modeled with SearchableAttribute.

## Definition

Namespace: Gemstone.Data.Model
Assembly: Gemstone.Data (in Gemstone.Data.dll) Version: 1.0.159 -- Release Build+9666939f99852a601f77d33e6f63320df255766c
C#
View Source Request Example

    public Task<int> QueryRecordCountAsync(
    	CancellationToken cancellationToken,
    	params IRecordFilter?[]? recordFilter
    )

VB
View Source Request Example

    Public Function QueryRecordCountAsync (
    	cancellationToken As CancellationToken,
    	ParamArray recordFilter As IRecordFilter()
    ) As Task(Of Integer)

C++
View Source Request Example

    public:
    virtual Task<int>^ QueryRecordCountAsync(
    	CancellationToken cancellationToken,
    	... array<IRecordFilter^>^ recordFilter
    ) sealed

JavaScript
View Source Request Example

    function QueryRecordCountAsync(cancellationToken, ... recordFilter);

#### Parameters

cancellationToken CancellationToken
  Propagates notification that operations should be canceled.
recordFilter IRecordFilter
  IRecordFilter to be filtered by

#### Return Value

Task Int32
Record count for the modeled table based on search parameter.

#### Implements

ITableOperationsQueryRecordCountAsync(CancellationToken, IRecordFilter)

## Remarks

This is a convenience call to QueryRecordCount(RecordRestriction) where restriction is generated by GetSearchRestrictions(IRecordFilter)

## See Also

#### Reference

TableOperationsT Class
QueryRecordCountAsync Overload
Gemstone.Data.Model Namespace