Gets the number of rows returned by a query for the fields specified, using the filter and groupby clause specified.

Namespace: MonoSoftware.LLBLGen
Assembly: MonoSoftware.LLBLGen (in MonoSoftware.LLBLGen.dll) Version: 1.0.40.661 (1.0.40.661)

Syntax

C#
public int GetDbCount(
	IEntityFields2 fields,
	IRelationPredicateBucket filter
)
Visual Basic
Public Function GetDbCount ( 
	fields As IEntityFields2,
	filter As IRelationPredicateBucket
) As Integer
Visual C++
public:
virtual int GetDbCount(
	IEntityFields2^ fields, 
	IRelationPredicateBucket^ filter
) sealed
F#
abstract GetDbCount : 
        fields : IEntityFields2 * 
        filter : IRelationPredicateBucket -> int 
override GetDbCount : 
        fields : IEntityFields2 * 
        filter : IRelationPredicateBucket -> int 

Parameters

fields
Type: IEntityFields2
IEntityFields2 instance with the fields returned by the query to get the rowcount for
filter
Type: IRelationPredicateBucket
filter to use by the query to get the rowcount for

Return Value

Type: Int32
the number of rows the query for the fields specified, using the filter, relations and groupbyClause specified.

Implements

IRepository..::..GetDbCount(IEntityFields2, IRelationPredicateBucket)

Remarks

This method performs a SELECT COUNT(*) FROM (actual query) and executes that as a scalar query. This construct is not supported on Firebird. You can try to achieve the same results by using GetScalar and AggregateFunction.CountRow, though those results can differ from the result returned by GetDbCount if you use a group by clause.

See Also