mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Update README.md
This commit is contained in:
13
README.md
13
README.md
@@ -155,20 +155,17 @@ var s9 = db.Insertable(insertObjs).InsertColumns(it => new { it.Name }).ExecuteC
|
|||||||
We use it to Delete
|
We use it to Delete
|
||||||
|
|
||||||
```cs
|
```cs
|
||||||
var t1 = db.Deleteable<Student>().Where(new Student() { Id = 1 }).ExecuteCommand();
|
//by entity
|
||||||
|
db.Deleteable<Student>().Where(new Student() { Id = 1 }).ExecuteCommand();
|
||||||
//use lock
|
|
||||||
var t2 = db.Deleteable<Student>().With(SqlWith.RowLock).ExecuteCommand();
|
|
||||||
|
|
||||||
|
|
||||||
//by primary key
|
//by primary key
|
||||||
var t3 = db.Deleteable<Student>().In(1).ExecuteCommand();
|
db.Deleteable<Student>().In(1).ExecuteCommand();
|
||||||
|
|
||||||
//by primary key array
|
//by primary key array
|
||||||
var t4 = db.Deleteable<Student>().In(new int[] { 1, 2 }).ExecuteCommand();
|
db.Deleteable<Student>().In(new int[] { 1, 2 }).ExecuteCommand();
|
||||||
|
|
||||||
//by expression
|
//by expression
|
||||||
var t5 = db.Deleteable<Student>().Where(it => it.Id == 1).ExecuteCommand();
|
db.Deleteable<Student>().Where(it => it.Id == 1).ExecuteCommand();
|
||||||
|
|
||||||
```
|
```
|
||||||
[<font color=red>View more >> </font>](https://github.com/sunkaixuan/SqlSugar/wiki/4.Deleteable )
|
[<font color=red>View more >> </font>](https://github.com/sunkaixuan/SqlSugar/wiki/4.Deleteable )
|
||||||
|
Reference in New Issue
Block a user