public async Task <IEnumerable <TEntity> > WhereAsync(string whereCondition, object param = default, Transaction transaction = default, CancellationToken cancellationToken = default) { using (var command = CommandDefinition.GetCommand(provider: _provider, connection: _dbConnection, commandText: DynamicQuery.Where <TEntity>(_provider, whereCondition), param: param, transaction: transaction)) { return(await CommandExecuter.ExecuteQueryAsync <TEntity>(_dbConnection, command, cancellationToken)); } }
public IEnumerable <TEntity> Where(string whereCondition, object param = default, Transaction transaction = default) { using (var command = CommandDefinition.GetCommand(provider: _provider, connection: _dbConnection, commandText: DynamicQuery.Where <TEntity>(_provider, whereCondition), param: param, transaction: transaction)) { return(CommandExecuter.ExecuteQuery <TEntity>(_dbConnection, command)); } }