Returns the number of records of T in the database

Namespace: Castle.ActiveRecord
Assembly:  Castle.ActiveRecord (in Castle.ActiveRecord.dll)
Version: 1.0.3.0

Syntax

C#
protected internal static int Count()

Return Value

The count query result

Examples

CopyC#
[ActiveRecord]
public class User : ActiveRecordBase<User>
{
  ...

  public static int CountAllUsers()
  {
    return Count(); // Equivalent to: Count(typeof(User));
  }
}

See Also