|
@ -425,16 +425,18 @@ namespace SqlSugar |
|
|
} |
|
|
} |
|
|
public IUpdateable<T> UpdateColumns(string[] columns) |
|
|
public IUpdateable<T> UpdateColumns(string[] columns) |
|
|
{ |
|
|
{ |
|
|
|
|
|
if (columns == null||columns.Length==0) return this; |
|
|
|
|
|
ThrowUpdateByExpression(); |
|
|
if (this.UpdateBuilder.UpdateColumns == null) |
|
|
if (this.UpdateBuilder.UpdateColumns == null) |
|
|
{ |
|
|
{ |
|
|
this.UpdateBuilder.UpdateColumns = new List<string>(); |
|
|
this.UpdateBuilder.UpdateColumns = new List<string>(); |
|
|
} |
|
|
} |
|
|
this.UpdateBuilder.UpdateColumns.AddRange(columns); |
|
|
this.UpdateBuilder.UpdateColumns.AddRange(columns); |
|
|
if (columns.HasValue()) |
|
|
//if (columns.HasValue())
|
|
|
{ |
|
|
//{
|
|
|
ThrowUpdateByExpression(); |
|
|
|
|
|
//this.UpdateBuilder.DbColumnInfoList = this.UpdateBuilder.DbColumnInfoList.Where(it => GetPrimaryKeys().Select(iit => iit.ToLower()).Contains(it.DbColumnName.ToLower()) || columns.Contains(it.PropertyName, StringComparer.OrdinalIgnoreCase)).ToList();
|
|
|
// //this.UpdateBuilder.DbColumnInfoList = this.UpdateBuilder.DbColumnInfoList.Where(it => GetPrimaryKeys().Select(iit => iit.ToLower()).Contains(it.DbColumnName.ToLower()) || columns.Contains(it.PropertyName, StringComparer.OrdinalIgnoreCase)).ToList();
|
|
|
} |
|
|
//}
|
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public IUpdateable<T> UpdateColumnsIF(bool isUpdateColumns, Expression<Func<T, object>> columns) |
|
|
public IUpdateable<T> UpdateColumnsIF(bool isUpdateColumns, Expression<Func<T, object>> columns) |
|
|