private void AddParameter(DaoSearchParameter parameter) { dbParameters.Add(parameter.SelectParameter.DbParameter); if (searchParameters.Count > 0) { searchParameters.Add(new DaoWhereAppenderSearchToken(next)); } next = parameter.WhereAppender; searchParameters.Add(parameter); }
/// <summary> /// This method should not be used if it can be avoided. Use an /// equivalent Field enum method instead. /// </summary> /// <param name="columnName"></param> /// <param name="value"></param> /// <param name="whereOperator"></param> public void AddParameter(string columnName, object value, Comparison whereOperator, WhereAppender appender) { if (appender == Data.WhereAppender.None) { appender = Data.WhereAppender.AND; } DaoSearchParameter param = new DaoSearchParameter(appender); param.Comparison = whereOperator; param.SelectParameter = new DbSelectParameter(columnName, value); AddParameter(param); }