public override TSqlQuery Compile(ClauseCompilationContext context) { Dictionary <string, object> parameters = new Dictionary <string, object>(); StringBuilder queryString = new StringBuilder(); foreach (Clause clause in InnerClauses) { if (queryString.Length > 0) { queryString.Append($" {SqlBuilderHelper.ConvertBooleanOperationToString(BooleanOperation)} "); } TSqlQuery clauseQuery = clause.Compile(context); queryString.Append(clauseQuery.Query); foreach (KeyValuePair <string, object> item in clauseQuery.Parameters) { parameters.Add(item.Key, item.Value); } } return(new TSqlQuery($"({queryString})", parameters)); }