public override string ToString() { var q = $"({QueryString}).{FormatString}"; var args = new List <string>(); if (LevelOfDetail != LevelOfDetail.Undefined) { args.Add($"detail={LevelOfDetailString}"); } if (Relations.Any()) { args.Add($"relations={string.Join(',', Relations)}"); } for (int i = 0; i < args.Count; i++) { q += i == 0 ? "?" : "&"; q += args[i]; } return(q); }
public QueryBuilder WithRelation(Relations relation) { _query.Relations.Add(relation); return(this); }