/// <summary> /// By default queries the table matching the class name. /// This uses your raw SQL so be careful to not create SQL injection holes. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="conditions"></param> /// <returns></returns> public async Task <int> RecordCountAsync <T>(string conditions = "", object parameters = null) { SetSimpleCRUD(); int ret = 0; using (var conn = new SqlConnection(_connectionString)) { conn.Open(); ret = await _simpleCRUD.RecordCountAsync <T>(conn, conditions, parameters); conn.Close(); } return(ret); }
public virtual Task <int> RecordCountAsync(string conditions = "", object parameters = null, IDbTransaction transaction = null, int?commandTimeout = null) { return(SimpleCRUD.RecordCountAsync <TModel>(_connection, conditions, parameters, transaction, commandTimeout)); }
public Task <int> RecordCountAsync(object whereConditions, IDbTransaction transaction = null, int?commandTimeout = null) { return(SimpleCRUD.RecordCountAsync <TModel>(_connection, whereConditions, transaction, commandTimeout)); }