public void Add(string fieldName, DbSearchOperation op, object value) { if (!string.IsNullOrEmpty(fieldName)) { DbSearchConditionInfo info = new DbSearchConditionInfo(); info.Field = fieldName; info.FieldData = value; info.SearchOperation = op; Conditions.Add(info); } }
public void Add(Expression <Func <T, object> > expr, DbSearchOperation op, object value) { string fieldName = expr.GetPropertyName <T>(); Add(fieldName, op, value); }