SqlFilterBuilder GetAlternation Method CleanCode C# Libraries v1.2.03 API
Handles zero, one, or more phrases, returning a standard SQL or clause.

Namespace: CleanCode.Data
Assembly: CleanCode (in CleanCode.dll) Version: (1.2.03)

public string GetAlternation(
	params string[] phrase


Type:  OnlineSystem String 
List of zero or more phrases to combine.

Return Value

SQL predicate with 'OR' operators as necessary.

With an argument list of, e.g., "phrase-x", "phrase-y", "phrase-z", the result will be (phrase-x OR phrase-y OR phrase-Z). Use GetPhrase(String,  String ) to generate the individual phrases passed as arguments to this method. This method is well-suited to automatic clause generation because any null or zero-length arguments will be skipped. See GetConjunction( String ) for an example of how this saves a lot of unnecessary coding on your part.
See Also