protected static Count ( |
||
targetType | The target type. | |
return | int |
/// <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)); }
/// <summary> /// Returns the number of records of the specified /// type in the database /// </summary> /// <example> /// <code> /// [ActiveRecord] /// public class User : ActiveRecordBase /// { /// ... /// /// public static int CountUsersLocked() /// { /// return Count(typeof(User), "IsLocked = ?", true); /// } /// } /// </code> /// </example> /// <param name="targetType">Type of the target.</param> /// <param name="filter">A sql where string i.e. Person=? and DOB > ?</param> /// <param name="args">Positional parameters for the filter string</param> /// <returns>The count result</returns> public static int Count(Type targetType, string filter, params object[] args) { return(ActiveRecordBase.Count(targetType, filter, args)); }
/// <summary> /// Returns the number of records of the specified /// type in the database /// </summary> /// <param name="targetType">The target type.</param> /// <param name="criteria">The criteria expression</param> /// <returns>The count result</returns> public static int Count(Type targetType, params ICriterion[] criteria) { return(ActiveRecordBase.Count(targetType, criteria)); }
/// <summary> /// Returns the number of records of the specified /// type in the database /// </summary> /// <example> /// <code> /// [ActiveRecord] /// public class User : ActiveRecordBase /// { /// ... /// /// public static int CountUsers() /// { /// return Count(typeof(User)); /// } /// } /// </code> /// </example> /// <param name="targetType">Type of the target.</param> /// <returns>The count result</returns> protected internal static int Count(Type targetType) { return(ActiveRecordBase.Count(targetType)); }
/// <summary> /// Returns the number of records of the specified /// type in the database /// </summary> /// <param name="detachedCriteria">The criteria expression</param> /// <returns>The count result</returns> public static int Count(DetachedCriteria detachedCriteria) { return(ActiveRecordBase.Count(typeof(T), detachedCriteria)); }
/// <summary> /// Returns the number of records of the specified /// type in the database /// </summary> /// <param name="filter">A sql where string i.e. Person=? and DOB > ?</param> /// <param name="args">Positional parameters for the filter string</param> /// <returns>The count result</returns> public static int Count(string filter, params object[] args) { return(ActiveRecordBase.Count(typeof(T), filter, args)); }
/// <summary> /// Returns the number of records of the specified /// type in the database that match the given critera /// </summary> /// <param name="criteria">The criteria expression</param> /// <returns>The count result</returns> public static int Count(params ICriterion[] criteria) { return(ActiveRecordBase.Count(typeof(T), criteria)); }
/// <summary> /// Returns the number of records of the specified /// type in the database /// </summary> /// <returns>The count result</returns> public static int Count() { return(ActiveRecordBase.Count(typeof(T))); }