Exists() protected static méthode

Check if there is any records in the db for the target type
protected static Exists ( Type targetType ) : bool
targetType System.Type The target type.
Résultat bool
Exemple #1
0
 /// <summary>
 /// Check if any instance matches the query.
 /// </summary>
 /// <param name="targetType">target Type</param>
 /// <param name="detachedQuery">The query expression</param>
 /// <returns><c>true</c> if an instance is found; otherwise <c>false</c>.</returns>
 public static bool Exists(Type targetType, IDetachedQuery detachedQuery)
 {
     return(ActiveRecordBase.Exists(targetType, detachedQuery));
 }
Exemple #2
0
 /// <summary>
 /// Check if any instance matches the criteria.
 /// </summary>
 /// <returns><c>true</c> if an instance is found; otherwise <c>false</c>.</returns>
 public static bool Exists(Type targetType, params ICriterion[] criterias)
 {
     return(ActiveRecordBase.Exists(targetType, criterias));
 }
Exemple #3
0
 /// <summary>
 /// Check if any instance matching the criteria exists in the database.
 /// </summary>
 /// <param name="targetType">The target type.</param>
 /// <param name="detachedCriteria">The criteria expression</param>
 /// <returns><c>true</c> if an instance is found; otherwise <c>false</c>.</returns>
 public static bool Exists(Type targetType, DetachedCriteria detachedCriteria)
 {
     return(ActiveRecordBase.Exists(targetType, detachedCriteria));
 }
Exemple #4
0
 /// <summary>
 /// Check if there is any records in the db for the target type
 /// </summary>
 /// <param name="targetType">Type of the target.</param>
 /// <param name="filter">A sql where string i.e. Person=? and DOB &gt; ?</param>
 /// <param name="args">Positional parameters for the filter string</param>
 /// <returns><c>true</c> if there's at least one row</returns>
 public static bool Exists(Type targetType, string filter, params object[] args)
 {
     return(ActiveRecordBase.Exists(targetType, filter, args));
 }
Exemple #5
0
 /// <summary>
 /// Check if the <paramref name="id"/> exists in the database.
 /// </summary>
 /// <param name="targetType">Type of the target.</param>
 /// <param name="id">The id to check on</param>
 /// <returns><c>true</c> if the ID exists; otherwise <c>false</c>.</returns>
 public static bool Exists(Type targetType, object id)
 {
     return(ActiveRecordBase.Exists(targetType, id));
 }
Exemple #6
0
 /// <summary>
 /// Check if there is any records in the db for <typeparamref name="T"/>
 /// </summary>
 /// <returns><c>true</c> if there's at least one row</returns>
 public static bool Exists()
 {
     return(ActiveRecordBase.Exists(typeof(T)));
 }
Exemple #7
0
 /// <summary>
 /// Check if there is any records in the db for the target type
 /// </summary>
 /// <param name="targetType">Type of the target.</param>
 /// <returns><c>true</c> if there's at least one row</returns>
 public static bool Exists(Type targetType)
 {
     return(ActiveRecordBase.Exists(targetType));
 }
 /// <summary>
 /// Check if any instance matching the criteria exists in the database.
 /// </summary>
 /// <param name="detachedCriteria">The criteria expression</param>
 /// <returns><c>true</c> if an instance is found; otherwise <c>false</c>.</returns>
 public static bool Exists(DetachedCriteria detachedCriteria)
 {
     return(ActiveRecordBase.Exists(typeof(T), detachedCriteria));
 }
 /// <summary>
 /// Check if any instance matches the criteria.
 /// </summary>
 /// <returns><c>true</c> if an instance is found; otherwise <c>false</c>.</returns>
 public static bool Exists(params ICriterion[] criterias)
 {
     return(ActiveRecordBase.Exists(typeof(T), criterias));
 }
 /// <summary>
 /// Check if the <paramref name="id"/> exists in the database.
 /// </summary>
 /// <param name="id">The id to check on</param>
 /// <returns><c>true</c> if the ID exists; otherwise <c>false</c>.</returns>
 public static bool Exists(object id)
 {
     return(ActiveRecordBase.Exists(typeof(T), id));
 }
 /// <summary>
 /// Check if there is any records in the db for the target type
 /// </summary>
 /// <param name="filter">A sql where string i.e. Person=? and DOB &gt; ?</param>
 /// <param name="args">Positional parameters for the filter string</param>
 /// <returns><c>true</c> if there's at least one row</returns>
 public static bool Exists(string filter, params object[] args)
 {
     return(ActiveRecordBase.Exists(typeof(T), filter, args));
 }
 /// <summary>
 /// Check if the <paramref name="id"/> exists in the database.
 /// </summary>
 /// <typeparam name="PkType">The <c>System.Type</c> of the PrimaryKey</typeparam>
 /// <param name="id">The id to check on</param>
 /// <returns><c>true</c> if the ID exists; otherwise <c>false</c>.</returns>
 public static bool Exists <PkType>(PkType id)
 {
     return(ActiveRecordBase <T> .Exists(id));
 }