private static string GetExpression(string type, string propName, object value, bool quoted) { switch (type.ToLower()) { case "equals": case "eq": return(QueryMaker.EqualsTo(propName, value, quoted)); case "notequals": case "neq": case "ne": return(QueryMaker.NotEquals(propName, value, quoted)); case "contains": case "c": return(QueryMaker.Contains(propName, value)); case "notcontains": case "doesnotcontain": case "dnc": case "nc": return(QueryMaker.NotContains(propName, value)); case "startswith": case "sw": return(QueryMaker.StartsWith(propName, value)); case "notstartswith": case "nsw": return(QueryMaker.NotStartsWith(propName, value)); case "endswith": case "ew": return(QueryMaker.EndsWith(propName, value)); case "notendswith": case "new": return(QueryMaker.NotEndsWith(propName, value)); case "isempty": case "ie": return(QueryMaker.IsEmpty(propName)); case "isnotempty": case "ino": return(QueryMaker.IsNotEmpty(propName)); case "isnull": case "in": return(QueryMaker.IsNull(propName)); case "isnotnull": case "inn": return(QueryMaker.IsNotNull(propName)); case "greaterthan": case "gt": return(QueryMaker.GreaterThan(propName, value, quoted)); case "lessthan": case "lt": return(QueryMaker.LessThan(propName, value, quoted)); case "greaterthanorequals": case "gtoe": case "gte": return(QueryMaker.GreaterThanOrEquals(propName, value, quoted)); case "lessthanorequals": case "ltoe": case "lte": return(QueryMaker.LessThanOrEquals(propName, value, quoted)); case "istrue": case "it": return(QueryMaker.IsTrue(propName)); case "isfalse": case "if": return(QueryMaker.IsFalse(propName)); default: return(""); } }