コード例 #1
0
 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));
     }
 }
コード例 #2
0
 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));
     }
 }