mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 16:18:47 +08:00
Update README.md
This commit is contained in:
parent
82bbc0e64d
commit
165afa4459
15
README.md
15
README.md
@ -306,13 +306,14 @@ public int TestId { get; set; }
|
|||||||
|
|
||||||
## 6. Use Tran
|
## 6. Use Tran
|
||||||
```c
|
```c
|
||||||
|
var result = db.Ado.UseTran(() =>
|
||||||
var dt2 = db.Ado.UseStoredProcedure().GetDataTable("sp_school",new{p1=1,p2=null});
|
{
|
||||||
|
|
||||||
//output
|
var beginCount = db.Queryable<Student>().ToList();
|
||||||
var p11 = new SugarParameter("@p1", "1");
|
db.Ado.ExecuteCommand("delete student");
|
||||||
var p22 = new SugarParameter("@p2", null, true);//isOutput=true
|
var endCount = db.Queryable<Student>().Count();
|
||||||
var dt2 = db.Ado.UseStoredProcedure().GetDataTable("sp_school",p11,p22);
|
throw new Exception("error haha");
|
||||||
|
})
|
||||||
```
|
```
|
||||||
## 7. Use Store Procedure
|
## 7. Use Store Procedure
|
||||||
```c
|
```c
|
||||||
|
Loading…
Reference in New Issue
Block a user