Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
electricessence authored Apr 1, 2018
1 parent b49e3f1 commit 02341c3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,22 @@ Depending on the level of asynchrony in your application, you may want to avoid
`ResultsAsync<T>()` is fully asynchronous from end-to-end but returns an `IEnumerable<T>` that although has fully buffered the all the data into memory, has deferred the transformation until enumerated. This way, the asynchronous data pipeline is fully complete before synchronously transforming the data.

Both methods ultimately are using a `Queue<object[]>` or `ConcurrentQueue<object[]>` (Dataflow) to buffer the data, but `ResultsAsync<T>()` buffers the entire data set before dequeuing and transforming the results.

## Transactions

Example:

```cs
// Returns true if the transaction is successful.
public static bool DoTransaction()
=> ConnectionFactory.Using(connection =>
// Open a connection and start a transaction.
connection.ExecuteTransactionConditional(c => {
/*
* Do some complex data access requring a potential roll-back.
*/

// Commit transation if true. Roll-back if false.
return true;
}));
```

0 comments on commit 02341c3

Please sign in to comment.