Support logic delete

This commit is contained in:
sunkaixuna
2021-11-10 15:26:05 +08:00
parent 338ce461f3
commit e65b2e014a
7 changed files with 109 additions and 3 deletions

View File

@@ -41,8 +41,19 @@ namespace OrmTest
//by expression
db.Deleteable<Order>().Where(it => it.Id == 11111).ExecuteCommand();
//logic delete
db.CodeFirst.InitTables<LogicTest>();
;
db.Deleteable<LogicTest>().Where(it=>it.Id==1).IsLogic().ExecuteCommand();
Console.WriteLine("#### Deleteable End ####");
}
}
public class LogicTest
{
[SugarColumn(IsPrimaryKey =true,IsIdentity =true)]
public int Id { get; set; }
public bool isdeleted { get; set; }
}
}