mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update README.md
This commit is contained in:
parent
61e655ab5f
commit
d4a083b83f
@ -127,18 +127,18 @@ public static SqlSugarScope Db = new SqlSugarScope(new ConnectionConfig()
|
|||||||
using (var tran = Db.UseTran())
|
using (var tran = Db.UseTran())
|
||||||
{
|
{
|
||||||
|
|
||||||
//业务代码
|
|
||||||
new Test2().Insert(XX);
|
new Test2().Insert(XX);
|
||||||
new Test1().Insert(XX);
|
new Test1().Insert(XX);
|
||||||
.....出错会自动回滚
|
.....
|
||||||
....
|
....
|
||||||
|
|
||||||
tran.CommitTran();//这个提交不能漏掉
|
tran.CommitTran();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
### Feature6 : Query filter
|
### Feature6 : Query filter
|
||||||
```cs
|
```cs
|
||||||
//set Filter
|
//set filter
|
||||||
db.QueryFilter.Add(new TableFilterItem<Order>(it => it.Name.Contains("a")));
|
db.QueryFilter.Add(new TableFilterItem<Order>(it => it.Name.Contains("a")));
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user