private static void AppendCharacteristicIn(this IFacetsBuilder <Entities.Product> facetsBuilder, ICollection <string> values) { facetsBuilder.AppendText(" and $char/value = ("); int count = 0; int lastIndex = values.Count - 1; foreach (string value in values) { string paramName = facetsBuilder.GetParamName(); facetsBuilder.AppendText("sql:variable(\""); facetsBuilder.AppendText(paramName); facetsBuilder.AppendText("\")"); facetsBuilder.AddParameter(paramName, value); if (count >= lastIndex) { break; } facetsBuilder.AppendText(","); count++; } facetsBuilder.AppendText(")"); }
private static void AppendCharacteristicName(this IFacetsBuilder <Entities.Product> facetsBuilder, string name) { string paramName = facetsBuilder.GetParamName(); facetsBuilder.AppendText("$char/name = sql:variable(\""); facetsBuilder.AppendText(paramName); facetsBuilder.AppendText("\")"); facetsBuilder.AddParameter(paramName, name); }