mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-06 16:30:52 +08:00
update
4
事务.md
4
事务.md
@@ -1,4 +1,4 @@
|
||||
## 1、UnitOfWork + Repository
|
||||
## 1、UnitOfWork 事务
|
||||
|
||||
```csharp
|
||||
using (var uow = fsql.CreateUnitOfWork()) {
|
||||
@@ -14,7 +14,7 @@ using (var uow = fsql.CreateUnitOfWork()) {
|
||||
|
||||
参考:[在 asp.net core 中使用 TransactionalAttribute + UnitOfWorkManager 实现多种事务传播](https://github.com/dotnetcore/FreeSql/issues/289)
|
||||
|
||||
## 2、DbContext
|
||||
## 2、DbContext 事务
|
||||
|
||||
```csharp
|
||||
using (var ctx = fsql.CreateDbContext()) {
|
||||
|
||||
Reference in New Issue
Block a user