Updateable Ignore(string []) BUG

This commit is contained in:
sunkaixuan
2019-05-29 17:21:27 +08:00
parent 252c188d9f
commit d84f970794
2 changed files with 2 additions and 1 deletions

View File

@@ -26,6 +26,7 @@ namespace OrmTest
Db.Updateable<BoolTest>(x).ReSetValue(it => it.BoolValue == it.BoolValue).ExecuteCommand();
Db.Updateable<BoolTest>(x).ReSetValue(it => it.BoolValue == true).ExecuteCommand();
Db.Updateable<BoolTest>(x).ReSetValue(it => it.BoolValue == !it.BoolValue).ExecuteCommand();
Db.Updateable<BoolTest>(x).UpdateColumns(it =>new { it.BoolValue }) .ExecuteCommand();
}
}

View File

@@ -138,7 +138,7 @@ namespace SqlSugar
{
if (columns.HasValue())
{
var ignoreColumns = columns;
var ignoreColumns = columns.Select(it => it.ToLower()).ToList() ;
this.UpdateBuilder.DbColumnInfoList = this.UpdateBuilder.DbColumnInfoList.Where(it => !ignoreColumns.Contains(it.PropertyName.ToLower())).ToList();
this.UpdateBuilder.DbColumnInfoList = this.UpdateBuilder.DbColumnInfoList.Where(it => !ignoreColumns.Contains(it.DbColumnName.ToLower())).ToList();
}