update

28810
2020-09-24 12:41:36 +08:00
parent fbca168c32
commit e3cfe98c4f
2 changed files with 41 additions and 34 deletions

@@ -250,6 +250,10 @@ uow.OnEntityChange = report => {
public class ChangeInfo {
public object Object { get; set; }
public EntityChangeType Type { get; set; }
/// <summary>
/// Type = Update 的时候,获取更新之前的对象
/// </summary>
public object BeforeObject { get; set; }
}
public enum EntityChangeType { Insert, Update, Delete, SqlRaw }
```

@@ -1,4 +1,3 @@
UnitOfWork 可将多个仓储放在一个单元管理执行,最终通用 Commit 执行所有操作,内部采用了数据库事务;
```csharp
@@ -96,6 +95,10 @@ uow.OnEntityChange = report => {
public class ChangeInfo {
public object Object { get; set; }
public EntityChangeType Type { get; set; }
/// <summary>
/// Type = Update 的时候,获取更新之前的对象
/// </summary>
public object BeforeObject { get; set; }
}
public enum EntityChangeType { Insert, Update, Delete, SqlRaw }
```