Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
adimiko authored Feb 7, 2024
1 parent 78f2263 commit 8363631
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
# TransactionContext
# TransactionContext (Proof of concept)
TransactionContext is designed to execute statements changing state (also call to stored procedures) in a single transaction and a single request to database (collects SQL statements without instant execution).

It can be an alternative for Entity Framework Core and TransactionScope in .NET.

```sh
transactionContext.Add("INSERT INTO Customers (CustomerId) VALUES (@CustomerId)", new { CustomerId = Guid.NewGuid() });
transactionContext.Add("INSERT INTO Orders (OrderId) VALUES (@OrderId)", new { OrderId = Guid.NewGuid() });
```
`transactionContext.Commit()` open connection, create transaction and execute sql statments in a single database request.
```sh
await transactionContext.Commit();
```

0 comments on commit 8363631

Please sign in to comment.