Esempio n. 1
0
 /// <summary>
 /// Update
 /// </summary>
 /// <param name="expression">表达式树</param>
 /// <param name="isEnableNullValue">是否对null值属性进行sql拼接操作,默认:是</param>
 /// <returns>SqlBuilderCore</returns>
 public SqlBuilderCore <T> Update(Expression <Func <object> > expression = null, bool isEnableNullValue = true)
 {
     this._sqlPack.Clear();
     this._sqlPack.IsSingleTable     = true;
     this._sqlPack.IsEnableNullValue = isEnableNullValue;
     this._sqlPack += $"UPDATE {this._sqlPack.GetTableName(typeof(T))} SET ";
     SqlBuilderProvider.Update(expression.Body, this._sqlPack);
     return(this);
 }
Esempio n. 2
0
 /// <summary>
 /// Update
 /// </summary>
 /// <param name="expression">表达式树</param>
 /// <param name="sqlPack">sql打包对象</param>
 /// <returns>SqlPack</returns>
 public override SqlPack Update(UnaryExpression expression, SqlPack sqlPack)
 {
     SqlBuilderProvider.Update(expression.Operand, sqlPack);
     return(sqlPack);
 }