mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 补充 IUpdate.Set(a => a.Click == 10),简化 Set 更新单个字段表达式;
This commit is contained in:
@ -341,6 +341,10 @@ namespace FreeSql.Internal.CommonProvider {
|
||||
return this;
|
||||
}
|
||||
public IUpdate<T1> Set<TMember>(Expression<Func<T1, TMember>> binaryExpression) {
|
||||
if (binaryExpression?.Body.NodeType == ExpressionType.Equal) {
|
||||
_set.Append(", ").Append(_commonExpression.ExpressionWhereLambdaNoneForeignObject(null, _table, null, binaryExpression, null));
|
||||
return this;
|
||||
}
|
||||
if (binaryExpression?.Body is BinaryExpression == false &&
|
||||
binaryExpression?.Body.NodeType != ExpressionType.Call) return this;
|
||||
var cols = new List<SelectColumnInfo>();
|
||||
|
Reference in New Issue
Block a user