/// <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 async Task <int> CountAsync <T>(string sql, object parameters) where T : class => await ExecuteInternalAsync(() => SharedConnection.CountAsync <T>(sql, parameters, _transaction, OneTimeCommandTimeout ?? CommandTimeout));
/// <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 async Task <int> CountAsync(string fullSql, object parameters) => await ExecuteInternalAsync(() => SharedConnection.CountAsync(fullSql, parameters, _transaction, OneTimeCommandTimeout ?? CommandTimeout));