Ejemplo n.º 1
0
 /// <summary>
 ///     Execute SQL that returns the number of matching records.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="sql">The SQL to execute.</param>
 /// <param name="parameters">The parameters to use for this query.</param>
 /// <returns>
 ///     Total Count of matching records.
 /// </returns>
 public int Count <T>(string sql, object parameters) where T : class => ExecuteInternal(() =>
                                                                                        SharedConnection.Count <T>(sql, parameters, _transaction, OneTimeCommandTimeout ?? CommandTimeout));
Ejemplo n.º 2
0
 /// <summary>
 ///     Execute SQL that returns the number of matching records.
 /// </summary>
 /// <param name="fullSql">The SQL to execute.</param>
 /// <param name="parameters">The parameters to use for this query.</param>
 /// <returns>
 ///     Total Count of matching records.
 /// </returns>
 public int Count(string fullSql, object parameters) => ExecuteInternal(() =>
                                                                        SharedConnection.Count(fullSql, parameters, _transaction, OneTimeCommandTimeout ?? CommandTimeout));