public IValueExpressionSyntax KeyEqualToValue(Dictionary <string, object> columnValues) { IValueExpressionSyntax ret = null; foreach (var columnValue in columnValues) { if (ret == null) { var column = new UpdateColumnSyntax(this, columnValue.Key, Delimiter.Comma); var equalTo = new EqualToSyntax <IValueExpressionSyntax>(column); ret = new ParameterizedValueExpressionSyntax(equalTo, columnValue.Value); } else { var column = new UpdateColumnSyntax(ret as SyntaxBase, columnValue.Key, Delimiter.Comma); var equalTo = new EqualToSyntax <IValueExpressionSyntax>(column); ret = new ParameterizedValueExpressionSyntax(equalTo, columnValue.Value); } } return(ret); }
public R KeyEqualToValue(Dictionary <string, object> conditions) { R ret = null; foreach (var condition in conditions) { if (ret == null) { var column = new SearchConditionSyntax <R, R1, R2>(this, condition.Key); var equal = new EqualToSyntax <R>(column); ret = equal.Value(condition.Value); } else { var and = new AndSyntax <R, R1, R2>(ret as SyntaxBase); var column = new SearchConditionSyntax <R, R1, R2>(and, condition.Key); var equal = new EqualToSyntax <R>(column); ret = equal.Value(condition.Value); } } return(ret); }