The value to add. May be null, which indicates
a value with NullValue set.
Add(RepeatedField<Projection>, string)
public static void Add(this RepeatedField<Projection> projections, string propertyName)
Adds a projection with the given property name to the repeated field.
This enables projections to be specified in a query with a collection initializer
in C# 6 and later.
The direction to order by. Must be Ascending or Descending.
Add(RepeatedField<PropertyReference>, string)
public static void Add(this RepeatedField<PropertyReference> propertyReferences, string propertyName)
Adds an entry to the list of property references.
This enables repeated property reference fields (such as DistinctOn
to be specified in a query with a collection initializer
in C# 6 and later.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eQueryExtensions\u003c/code\u003e class within the Google Cloud Datastore v1 API for .NET, which offers extension methods for working with queries.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the documentation is for version 4.15.0, with other historical versions listed and linked for reference, ranging down to 3.2.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eQueryExtensions\u003c/code\u003e class, part of the \u003ccode\u003eGoogle.Cloud.Datastore.V1\u003c/code\u003e namespace, primarily provides methods for adding parameters, projections, and ordering to queries, along with working with property references.\u003c/p\u003e\n"],["\u003cp\u003eAvailable methods include \u003ccode\u003eAdd\u003c/code\u003e, which allows for adding GQL parameters, property projections, property orderings, and property references, with varying parameters depending on the specific functionality.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation also contains the inherited members of the class such as \u003ccode\u003eGetHashCode()\u003c/code\u003e, \u003ccode\u003eGetType()\u003c/code\u003e, \u003ccode\u003eMemberwiseClone()\u003c/code\u003e, and \u003ccode\u003eToString()\u003c/code\u003e, and lists the parameters with their respective descriptions for each of the \u003ccode\u003eAdd\u003c/code\u003e methods.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Datastore v1 API - Class QueryExtensions (4.15.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.15.0 (latest)](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.14.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.13.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.12.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.11.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.10.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.9.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.8.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.7.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.6.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.5.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.4.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.3.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.2.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.1.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.0.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.5.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.4.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.3.0/Google.Cloud.Datastore.V1.QueryExtensions)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.2.0/Google.Cloud.Datastore.V1.QueryExtensions) \n\n public static class QueryExtensions\n\nReference documentation and code samples for the Google Cloud Datastore v1 API class QueryExtensions.\n\nExtension methods around queries. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e QueryExtensions \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Datastore.V1](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Datastore.V1.dll\n\nMethods\n-------\n\n### Add(MapField\\\u003cstring, GqlQueryParameter\\\u003e, string, Value)\n\n public static void Add(this MapField\u003cstring, GqlQueryParameter\u003e parameters, string parameterName, Value value)\n\nAdds a GQL parameter with the specified value.\n\n### Add(RepeatedField\\\u003cGqlQueryParameter\\\u003e, Value)\n\n public static void Add(this RepeatedField\u003cGqlQueryParameter\u003e parameters, Value value)\n\nAdds a GQL parameter with the specified value.\n\n### Add(RepeatedField\\\u003cProjection\\\u003e, string)\n\n public static void Add(this RepeatedField\u003cProjection\u003e projections, string propertyName)\n\nAdds a projection with the given property name to the repeated field.\nThis enables projections to be specified in a query with a collection initializer\nin C# 6 and later.\n\n### Add(RepeatedField\\\u003cPropertyOrder\\\u003e, string)\n\n public static void Add(this RepeatedField\u003cPropertyOrder\u003e orderings, string propertyName)\n\nAdds an ascending ordering by property name. The ordering is implicitly ascending.\n\n### Add(RepeatedField\\\u003cPropertyOrder\\\u003e, string, Direction)\n\n public static void Add(this RepeatedField\u003cPropertyOrder\u003e orderings, string propertyName, PropertyOrder.Types.Direction direction)\n\nAdds an ordering by property name and direction.\n\n### Add(RepeatedField\\\u003cPropertyReference\\\u003e, string)\n\n public static void Add(this RepeatedField\u003cPropertyReference\u003e propertyReferences, string propertyName)\n\nAdds an entry to the list of property references.\nThis enables repeated property reference fields (such as [DistinctOn](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.Query#Google_Cloud_Datastore_V1_Query_DistinctOn)\nto be specified in a query with a collection initializer\nin C# 6 and later."]]