public void Execute(IDictionary <string, StringValues> qs, ref QueryContext context) { qs.TryGetValue(_options.Value.FieldsOperator, out var fields); if (fields.Count == 0) { return; } var options = new FieldOptions(); foreach (var field in fields) { foreach (var value in field.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) { var v = value.Trim(); options.Fields.Add(v); } } if (!options.Validate(context.Type, _options.Value, out var errors)) { context.Errors.Add(new Error(ErrorEvents.ValidationFailed, ErrorStrings.ValidationFailed, HttpStatusCode.BadRequest, errors)); } context.Fields = options; }