public UpdateFollowingBuilder <T> Update <T>(UpdateDeclaration <T> declaration) { UpdateClause updateClause = new UpdateClause(typeof(T).Name, declaration.GetUpdateItems()); _clauses.Add(updateClause); return(new UpdateFollowingBuilder <T>(_clauses)); }
public UpdateFollowingBuilder <T> Update <T>(Expression <Func <UpdateDeclaration <T>, UpdateDeclaration <T> > > expression) { UpdateDeclaration <T> declaration = new UpdateDeclaration <T>(); declaration = expression.Compile().Invoke(declaration); return(Update(declaration)); }
public static UpdateDeclaration <T> Set <T>(this UpdateDeclaration <T> declaration, Expression <Func <T, object> > fieldExpression, object value, Func <object, bool> setCondition) { if (setCondition(value)) { return(declaration.Set(fieldExpression, value)); } return(declaration); }