public static string GetString(this QueryPartType s1) { switch (s1) { case QueryPartType.Equal: return("="); case QueryPartType.NotEqual: return("!="); case QueryPartType.Like: return("LIKE"); case QueryPartType.In: return("IN"); case QueryPartType.Between: return("Between"); default: return("="); } }
public void AddValue(string value, QueryPartType type = QueryPartType.Equal) { QueryParts.Add(new QueryPart(Key, value, type)); }
public void AddParameter(string key, string value, QueryPartType type = QueryPartType.Equal) { _parameters.Add(key, new QueryPart(key, value, type)); }
public QueryPart(string key, string value = "", QueryPartType type = QueryPartType.Equal) { Key = key; Value = value; Type = type; }