|
|
@ -531,6 +531,21 @@ namespace SqlSugar |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
public IUpdateable<T> SetColumns(Expression<Func<T, object>> filedNameExpression, Expression<Func<T, object>> valueExpression) |
|
|
|
{ |
|
|
|
var name = UpdateBuilder.GetExpressionValue(filedNameExpression, ResolveExpressType.FieldSingle).GetString(); |
|
|
|
name = UpdateBuilder.Builder.GetNoTranslationColumnName(name); |
|
|
|
var value = UpdateBuilder.GetExpressionValue(valueExpression, ResolveExpressType.FieldSingle).GetString(); |
|
|
|
this.UpdateBuilder.DbColumnInfoList.Add(new DbColumnInfo() |
|
|
|
{ |
|
|
|
DbColumnName = name, |
|
|
|
Value = value, |
|
|
|
PropertyName = name , |
|
|
|
SqlParameterDbType=typeof(SqlSugar.DbConvert.NoParameterCommonPropertyConvert) |
|
|
|
}); |
|
|
|
this.UpdateBuilder.SetValues.Add(new KeyValuePair<string, string>(name,value)); |
|
|
|
return this; |
|
|
|
} |
|
|
|
public IUpdateable<T> SetColumns(Expression<Func<T, object>> filedNameExpression, object fieldValue) |
|
|
|
{ |
|
|
|
var name= UpdateBuilder.GetExpressionValue(filedNameExpression,ResolveExpressType.FieldSingle).GetString(); |
|
|
|