public static SqlWhereCollection SqlWhereExists( this SqlWhereCollection self, string clauseFormat, params string[] whereCollection) { return(self.Add(raw: clauseFormat.Replace("#SqlWhere#", whereCollection.Join(" and ")))); }
public static SqlWhereCollection SqlWhereLike( this SqlWhereCollection self, string searchText, params string[] clauseCollection) { var searchTextCollection = Sqls.SearchTextCollection(searchText); return(self.Add( name: "SearchText", value: searchTextCollection, raw: "(@SearchText#ParamCount#_#CommandCount# = '' or (" + clauseCollection.Join(" or ") + "))", _using: searchTextCollection.Any())); }
public static SqlWhereCollection SqlWhereLike( this SqlWhereCollection self, string name, string searchText, List <string> clauseCollection) { var searchTextCollection = SearchTextCollection(searchText); return(self.Add( name: name, value: searchTextCollection, raw: $"(@{name}#ParamCount#_#CommandCount# = '' or (" + clauseCollection.Join(" or ") + "))", _using: searchTextCollection.Any())); }
public static SqlWhereCollection SqlWhereLike( this SqlWhereCollection self, string tableName, string name, string searchText, List <string> clauseCollection) { var searchTextCollection = SearchTextCollection(searchText); return(self.Add( tableName: tableName, name: name, value: searchTextCollection, raw: $"({clauseCollection.Join(" or ")})", _using: searchTextCollection.Any())); }