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