更改CaseWhen无法更新数据问题(待修改字段值为NULL时还是无法修改)

This commit is contained in:
chenbo
2021-11-27 21:48:47 +08:00
parent c22d8d74d2
commit 4c7e04376f
2 changed files with 6 additions and 1 deletions

View File

@ -173,6 +173,7 @@ namespace FreeSql.Tests.MySql
var repository=fsql.GetRepository<TestAuditValue>();
var list = repository.Select.ToList();
list.ForEach(o=>o.UpdateTime = DateTime.Now);
list.ForEach(o => o.Enable = true);
repository.Update(list);
}
@ -182,6 +183,7 @@ namespace FreeSql.Tests.MySql
{
var fsql = g.clickHouse;
var state=fsql.GetRepository<TestAuditValue>().UpdateDiy.Set(o=>o.UpdateTime,DateTime.Now).Where(o=>1==1).ExecuteAffrows();
//var state1 = fsql.GetRepository<TestAuditValue>().UpdateDiy.Set(o => o.UpdateTime, null).Where(o => 1 == 1).ExecuteAffrows();
}