Castle.ActiveRecord.ActiveRecordBase.Count C# (CSharp) Method

Count() protected static method

Returns the number of records of the specified type in the database
protected static Count ( Type targetType ) : int
targetType System.Type The target type.
return int
		protected internal static int Count(Type targetType)
		{
			CountQuery query = new CountQuery(targetType);

			return (int)ExecuteQuery(query);
		}

Same methods

ActiveRecordBase::Count ( Type targetType, DetachedCriteria detachedCriteria ) : int
ActiveRecordBase::Count ( Type targetType, ICriterion criteria ) : int
ActiveRecordBase::Count ( Type targetType, string filter ) : int

Usage Example

Beispiel #1
0
 /// <summary>
 /// Returns the number of records of the specified
 /// type in the database
 /// </summary>
 /// <param name="targetType">The target type.</param>
 /// <param name="detachedCriteria">The criteria expression</param>
 /// <returns>The count result</returns>
 public static int Count(Type targetType, DetachedCriteria detachedCriteria)
 {
     return(ActiveRecordBase.Count(targetType, detachedCriteria));
 }
All Usage Examples Of Castle.ActiveRecord.ActiveRecordBase::Count