diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/Updateable.cs b/Src/Asp.Net/SqlServerTest/UnitTest/Updateable.cs index 785ca7b08..22785ecd7 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/Updateable.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/Updateable.cs @@ -23,13 +23,18 @@ namespace OrmTest Db.Updateable().SetColumns(it => it.BoolValue == x.BoolValue).Where(it => it.Id == 1).ExecuteCommand(); Db.Updateable().SetColumns(it => new BoolTest() { BoolValue = !x.BoolValue }).Where(it => it.Id == 1).ExecuteCommand(); Db.Updateable().SetColumns(it => it.BoolValue == !x.BoolValue).Where(it => it.Id == 1).ExecuteCommand(); + Db.Updateable(x).ReSetValue(it => it.BoolValue == it.BoolValue).ExecuteCommand(); + Db.Updateable(x).ReSetValue(it => it.BoolValue == true).ExecuteCommand(); + Db.Updateable(x).ReSetValue(it => it.BoolValue == !it.BoolValue).ExecuteCommand(); } } public class BoolTest { + [SugarColumn(IsPrimaryKey =true)] public int Id { get; set; } public bool BoolValue { get; set; } + public string Name { get; set; } } /// /// 普通用户表