Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
11309 lines (11215 sloc) 952 KB
<Type Name="DocumentClient" FullName="Microsoft.Azure.Documents.Client.DocumentClient">
<TypeSignature Language="C#" Value="public sealed class DocumentClient : IDisposable" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed DocumentClient extends System.Object implements class Microsoft.Azure.Documents.IDocumentClient, class System.IDisposable" />
<TypeSignature Language="DocId" Value="T:Microsoft.Azure.Documents.Client.DocumentClient" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class DocumentClient&#xA;Implements IDisposable" />
<TypeSignature Language="F#" Value="type DocumentClient = class&#xA; interface IDisposable&#xA; interface IDocumentClient" />
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>Microsoft.Azure.Documents.IDocumentClient</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>
Provides a client-side logical representation for the Azure Cosmos DB service.
This client is used to configure and execute requests against the service.
</summary>
<remarks>
The service client that encapsulates the endpoint and credentials and connection policy used to access the Azure Cosmos DB service.
It is recommended to cache and reuse this instance within your application rather than creating a new instance for every operation.
<para>
When your app uses DocumentClient, you should call its IDisposable.Dispose implementation when you are finished using it.
Depending on your programming technique, you can do this in one of two ways:
</para><para>
1. By using a language construct such as the using statement in C#.
The using statement is actually a syntactic convenience.
At compile time, the language compiler implements the intermediate language (IL) for a try/catch block.
<code language="c#"><![CDATA[
using (IDocumentClient client = new DocumentClient(new Uri("endpoint"), "authKey"))
{
...
}
]]></code></para><para>
2. By wrapping the call to the IDisposable.Dispose implementation in a try/catch block.
The following example replaces the using block in the previous example with a try/catch/finally block.
<code language="c#"><![CDATA[
IDocumentClient client = new DocumentClient(new Uri("endpoint"), "authKey"))
try{
...
}
finally{
if (client != null) client.Dispose();
}
]]></code></para></remarks>
<threadSafety>
This type is thread safe.
</threadSafety>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DocumentClient (Uri serviceEndpoint, System.Collections.Generic.IDictionary&lt;string,string&gt; resourceTokens, Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy = null, Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri serviceEndpoint, class System.Collections.Generic.IDictionary`2&lt;string, string&gt; resourceTokens, class Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, valuetype System.Nullable`1&lt;valuetype Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.#ctor(System.Uri,System.Collections.Generic.IDictionary{System.String,System.String},Microsoft.Azure.Documents.Client.ConnectionPolicy,System.Nullable{Microsoft.Azure.Documents.ConsistencyLevel})" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Documents.Client.DocumentClient : Uri * System.Collections.Generic.IDictionary&lt;string, string&gt; * Microsoft.Azure.Documents.Client.ConnectionPolicy * Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; -&gt; Microsoft.Azure.Documents.Client.DocumentClient" Usage="new Microsoft.Azure.Documents.Client.DocumentClient (serviceEndpoint, resourceTokens, connectionPolicy, desiredConsistencyLevel)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Obsolete("Please use the constructor that takes a permission list or a resource token list.")</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="serviceEndpoint" Type="System.Uri" />
<Parameter Name="resourceTokens" Type="System.Collections.Generic.IDictionary&lt;System.String,System.String&gt;" />
<Parameter Name="connectionPolicy" Type="Microsoft.Azure.Documents.Client.ConnectionPolicy" />
<Parameter Name="desiredConsistencyLevel" Type="System.Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt;" />
</Parameters>
<Docs>
<param name="serviceEndpoint">The service endpoint to use to create the client.</param>
<param name="resourceTokens">A dictionary of resource ids and resource tokens.</param>
<param name="connectionPolicy">(Optional) The connection policy for the client.</param>
<param name="desiredConsistencyLevel">(Optional) The default consistency policy for client operations.</param>
<summary>
Initializes a new instance of the Microsoft.Azure.Documents.Client.DocumentClient class using the
specified Azure Cosmos DB service endpoint, a dictionary of resource tokens and a connection policy.
</summary>
<remarks>Using Direct connectivity, wherever possible, is recommended</remarks>
<altmember cref="T:System.Uri" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConsistencyLevel" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DocumentClient (Uri serviceEndpoint, System.Collections.Generic.IList&lt;Microsoft.Azure.Documents.Permission&gt; permissionFeed, Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy = null, Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri serviceEndpoint, class System.Collections.Generic.IList`1&lt;class Microsoft.Azure.Documents.Permission&gt; permissionFeed, class Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, valuetype System.Nullable`1&lt;valuetype Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.#ctor(System.Uri,System.Collections.Generic.IList{Microsoft.Azure.Documents.Permission},Microsoft.Azure.Documents.Client.ConnectionPolicy,System.Nullable{Microsoft.Azure.Documents.ConsistencyLevel})" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Documents.Client.DocumentClient : Uri * System.Collections.Generic.IList&lt;Microsoft.Azure.Documents.Permission&gt; * Microsoft.Azure.Documents.Client.ConnectionPolicy * Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; -&gt; Microsoft.Azure.Documents.Client.DocumentClient" Usage="new Microsoft.Azure.Documents.Client.DocumentClient (serviceEndpoint, permissionFeed, connectionPolicy, desiredConsistencyLevel)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="serviceEndpoint" Type="System.Uri" />
<Parameter Name="permissionFeed" Type="System.Collections.Generic.IList&lt;Microsoft.Azure.Documents.Permission&gt;" />
<Parameter Name="connectionPolicy" Type="Microsoft.Azure.Documents.Client.ConnectionPolicy" />
<Parameter Name="desiredConsistencyLevel" Type="System.Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt;" />
</Parameters>
<Docs>
<param name="serviceEndpoint">The service endpoint to use to create the client.</param>
<param name="permissionFeed">A list of Permission objects to use to create the client.</param>
<param name="connectionPolicy">(Optional) The <see cref="T:Microsoft.Azure.Documents.Client.ConnectionPolicy" /> to use for this connection.</param>
<param name="desiredConsistencyLevel">(Optional) The default consistency policy for client operations.</param>
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Azure.Documents.Client.DocumentClient" /> class using the
specified Azure Cosmos DB service endpoint for the Azure Cosmos DB service, a list of permission objects and a connection policy.
</summary>
<remarks>
If no <paramref name="connectionPolicy" /> is provided, then the default <see cref="T:Microsoft.Azure.Documents.Client.ConnectionPolicy" /> will be used.
Using Direct connectivity, wherever possible, is recommended.
</remarks>
<exception cref="T:System.ArgumentNullException">If <paramref name="permissionFeed" /> is not supplied.</exception>
<exception cref="T:System.ArgumentException">If <paramref name="permissionFeed" /> is not a valid permission link.</exception>
<altmember cref="T:System.Uri" />
<altmember cref="T:Microsoft.Azure.Documents.Permission" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConsistencyLevel" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DocumentClient (Uri serviceEndpoint, System.Security.SecureString authKey, Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy = null, Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri serviceEndpoint, class System.Security.SecureString authKey, class Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, valuetype System.Nullable`1&lt;valuetype Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.#ctor(System.Uri,System.Security.SecureString,Microsoft.Azure.Documents.Client.ConnectionPolicy,System.Nullable{Microsoft.Azure.Documents.ConsistencyLevel})" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Documents.Client.DocumentClient : Uri * System.Security.SecureString * Microsoft.Azure.Documents.Client.ConnectionPolicy * Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; -&gt; Microsoft.Azure.Documents.Client.DocumentClient" Usage="new Microsoft.Azure.Documents.Client.DocumentClient (serviceEndpoint, authKey, connectionPolicy, desiredConsistencyLevel)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="serviceEndpoint" Type="System.Uri" />
<Parameter Name="authKey" Type="System.Security.SecureString" />
<Parameter Name="connectionPolicy" Type="Microsoft.Azure.Documents.Client.ConnectionPolicy" />
<Parameter Name="desiredConsistencyLevel" Type="System.Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt;" />
</Parameters>
<Docs>
<param name="serviceEndpoint">
The service endpoint to use to create the client.
</param>
<param name="authKey">
The list of Permission objects to use to create the client.
</param>
<param name="connectionPolicy">
(Optional) The connection policy for the client. If none is passed, the default is used <see cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" /></param>
<param name="desiredConsistencyLevel">
(Optional) This can be used to weaken the database account consistency level for read operations.
If this is not set the database account consistency level will be used for all requests.
</param>
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Azure.Documents.Client.DocumentClient" /> class using the
specified Azure Cosmos DB service endpoint, key, and connection policy for the Azure Cosmos DB service.
</summary>
<remarks>
The service endpoint and the authorization key can be obtained from the Azure Management Portal.
The authKey used here is encrypted for privacy when being used, and deleted from computer memory when no longer needed
<para>
Using Direct connectivity, wherever possible, is recommended
</para></remarks>
<altmember cref="T:System.Uri" />
<altmember cref="T:System.Security.SecureString" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConsistencyLevel" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DocumentClient (Uri serviceEndpoint, string authKeyOrResourceToken, Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy = null, Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri serviceEndpoint, string authKeyOrResourceToken, class Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, valuetype System.Nullable`1&lt;valuetype Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.#ctor(System.Uri,System.String,Microsoft.Azure.Documents.Client.ConnectionPolicy,System.Nullable{Microsoft.Azure.Documents.ConsistencyLevel})" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Documents.Client.DocumentClient : Uri * string * Microsoft.Azure.Documents.Client.ConnectionPolicy * Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; -&gt; Microsoft.Azure.Documents.Client.DocumentClient" Usage="new Microsoft.Azure.Documents.Client.DocumentClient (serviceEndpoint, authKeyOrResourceToken, connectionPolicy, desiredConsistencyLevel)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="serviceEndpoint" Type="System.Uri" />
<Parameter Name="authKeyOrResourceToken" Type="System.String" />
<Parameter Name="connectionPolicy" Type="Microsoft.Azure.Documents.Client.ConnectionPolicy" />
<Parameter Name="desiredConsistencyLevel" Type="System.Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt;" />
</Parameters>
<Docs>
<param name="serviceEndpoint">The service endpoint to use to create the client.</param>
<param name="authKeyOrResourceToken">The authorization key or resource token to use to create the client.</param>
<param name="connectionPolicy">(Optional) The connection policy for the client.</param>
<param name="desiredConsistencyLevel">(Optional) The default consistency policy for client operations.</param>
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Azure.Documents.Client.DocumentClient" /> class using the
specified service endpoint, an authorization key (or resource token) and a connection policy
for the Azure Cosmos DB service.
</summary>
<remarks>
The service endpoint can be obtained from the Azure Management Portal.
If you are connecting using one of the Master Keys, these can be obtained along with the endpoint from the Azure Management Portal
If however you are connecting as a specific Azure Cosmos DB User, the value passed to <paramref name="authKeyOrResourceToken" /> is the ResourceToken obtained from the permission feed for the user.
<para>
Using Direct connectivity, wherever possible, is recommended.
</para></remarks>
<altmember cref="T:System.Uri" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConsistencyLevel" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DocumentClient (Uri serviceEndpoint, System.Security.SecureString authKey, Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel, Newtonsoft.Json.JsonSerializerSettings serializerSettings);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri serviceEndpoint, class System.Security.SecureString authKey, class Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, valuetype System.Nullable`1&lt;valuetype Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel, class Newtonsoft.Json.JsonSerializerSettings serializerSettings) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.#ctor(System.Uri,System.Security.SecureString,Microsoft.Azure.Documents.Client.ConnectionPolicy,System.Nullable{Microsoft.Azure.Documents.ConsistencyLevel},Newtonsoft.Json.JsonSerializerSettings)" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Documents.Client.DocumentClient : Uri * System.Security.SecureString * Microsoft.Azure.Documents.Client.ConnectionPolicy * Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; * Newtonsoft.Json.JsonSerializerSettings -&gt; Microsoft.Azure.Documents.Client.DocumentClient" Usage="new Microsoft.Azure.Documents.Client.DocumentClient (serviceEndpoint, authKey, connectionPolicy, desiredConsistencyLevel, serializerSettings)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Obsolete("Please use the constructor that takes JsonSerializerSettings as the third parameter.")</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="serviceEndpoint" Type="System.Uri" />
<Parameter Name="authKey" Type="System.Security.SecureString" />
<Parameter Name="connectionPolicy" Type="Microsoft.Azure.Documents.Client.ConnectionPolicy" />
<Parameter Name="desiredConsistencyLevel" Type="System.Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt;" />
<Parameter Name="serializerSettings" Type="Newtonsoft.Json.JsonSerializerSettings" />
</Parameters>
<Docs>
<param name="serviceEndpoint">
The service endpoint to use to create the client.
</param>
<param name="authKey">
The list of Permission objects to use to create the client.
</param>
<param name="connectionPolicy">
The connection policy for the client.
</param>
<param name="desiredConsistencyLevel">
This can be used to weaken the database account consistency level for read operations.
If this is not set the database account consistency level will be used for all requests.
</param>
<param name="serializerSettings">
The custom JsonSerializer settings to be used for serialization/derialization.
</param>
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Azure.Documents.Client.DocumentClient" /> class using the
specified Azure Cosmos DB service endpoint, key, connection policy and a custom JsonSerializerSettings
for the Azure Cosmos DB service.
</summary>
<remarks>
The service endpoint and the authorization key can be obtained from the Azure Management Portal.
The authKey used here is encrypted for privacy when being used, and deleted from computer memory when no longer needed
<para>
Using Direct connectivity, wherever possible, is recommended
</para></remarks>
<altmember cref="T:System.Uri" />
<altmember cref="T:System.Security.SecureString" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConsistencyLevel" />
<altmember cref="T:Newtonsoft.Json.JsonSerializerSettings" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DocumentClient (Uri serviceEndpoint, System.Security.SecureString authKey, Newtonsoft.Json.JsonSerializerSettings serializerSettings, Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy = null, Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri serviceEndpoint, class System.Security.SecureString authKey, class Newtonsoft.Json.JsonSerializerSettings serializerSettings, class Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, valuetype System.Nullable`1&lt;valuetype Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.#ctor(System.Uri,System.Security.SecureString,Newtonsoft.Json.JsonSerializerSettings,Microsoft.Azure.Documents.Client.ConnectionPolicy,System.Nullable{Microsoft.Azure.Documents.ConsistencyLevel})" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Documents.Client.DocumentClient : Uri * System.Security.SecureString * Newtonsoft.Json.JsonSerializerSettings * Microsoft.Azure.Documents.Client.ConnectionPolicy * Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; -&gt; Microsoft.Azure.Documents.Client.DocumentClient" Usage="new Microsoft.Azure.Documents.Client.DocumentClient (serviceEndpoint, authKey, serializerSettings, connectionPolicy, desiredConsistencyLevel)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="serviceEndpoint" Type="System.Uri" />
<Parameter Name="authKey" Type="System.Security.SecureString" />
<Parameter Name="serializerSettings" Type="Newtonsoft.Json.JsonSerializerSettings" />
<Parameter Name="connectionPolicy" Type="Microsoft.Azure.Documents.Client.ConnectionPolicy" />
<Parameter Name="desiredConsistencyLevel" Type="System.Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt;" />
</Parameters>
<Docs>
<param name="serviceEndpoint">
The service endpoint to use to create the client.
</param>
<param name="authKey">
The list of Permission objects to use to create the client.
</param>
<param name="serializerSettings">
The custom JsonSerializer settings to be used for serialization/derialization.
</param>
<param name="connectionPolicy">
(Optional) The connection policy for the client. If none is passed, the default is used <see cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" /></param>
<param name="desiredConsistencyLevel">
(Optional) This can be used to weaken the database account consistency level for read operations.
If this is not set the database account consistency level will be used for all requests.
</param>
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Azure.Documents.Client.DocumentClient" /> class using the
specified Azure Cosmos DB service endpoint, key, connection policy and a custom JsonSerializerSettings
for the Azure Cosmos DB service.
</summary>
<remarks>
The service endpoint and the authorization key can be obtained from the Azure Management Portal.
The authKey used here is encrypted for privacy when being used, and deleted from computer memory when no longer needed
<para>
Using Direct connectivity, wherever possible, is recommended
</para></remarks>
<altmember cref="T:System.Uri" />
<altmember cref="T:System.Security.SecureString" />
<altmember cref="T:Newtonsoft.Json.JsonSerializerSettings" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConsistencyLevel" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DocumentClient (Uri serviceEndpoint, string authKeyOrResourceToken, Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel, Newtonsoft.Json.JsonSerializerSettings serializerSettings);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri serviceEndpoint, string authKeyOrResourceToken, class Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, valuetype System.Nullable`1&lt;valuetype Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel, class Newtonsoft.Json.JsonSerializerSettings serializerSettings) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.#ctor(System.Uri,System.String,Microsoft.Azure.Documents.Client.ConnectionPolicy,System.Nullable{Microsoft.Azure.Documents.ConsistencyLevel},Newtonsoft.Json.JsonSerializerSettings)" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Documents.Client.DocumentClient : Uri * string * Microsoft.Azure.Documents.Client.ConnectionPolicy * Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; * Newtonsoft.Json.JsonSerializerSettings -&gt; Microsoft.Azure.Documents.Client.DocumentClient" Usage="new Microsoft.Azure.Documents.Client.DocumentClient (serviceEndpoint, authKeyOrResourceToken, connectionPolicy, desiredConsistencyLevel, serializerSettings)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Obsolete("Please use the constructor that takes JsonSerializerSettings as the third parameter.")</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="serviceEndpoint" Type="System.Uri" />
<Parameter Name="authKeyOrResourceToken" Type="System.String" />
<Parameter Name="connectionPolicy" Type="Microsoft.Azure.Documents.Client.ConnectionPolicy" />
<Parameter Name="desiredConsistencyLevel" Type="System.Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt;" />
<Parameter Name="serializerSettings" Type="Newtonsoft.Json.JsonSerializerSettings" />
</Parameters>
<Docs>
<param name="serviceEndpoint">The service endpoint to use to create the client.</param>
<param name="authKeyOrResourceToken">The authorization key or resource token to use to create the client.</param>
<param name="connectionPolicy">The connection policy for the client.</param>
<param name="desiredConsistencyLevel">The default consistency policy for client operations.</param>
<param name="serializerSettings">The custom JsonSerializer settings to be used for serialization/derialization.</param>
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Azure.Documents.Client.DocumentClient" /> class using the
specified service endpoint, an authorization key (or resource token), a connection policy
and a custom JsonSerializerSettings for the Azure Cosmos DB service.
</summary>
<remarks>
The service endpoint can be obtained from the Azure Management Portal.
If you are connecting using one of the Master Keys, these can be obtained along with the endpoint from the Azure Management Portal
If however you are connecting as a specific Azure Cosmos DB User, the value passed to <paramref name="authKeyOrResourceToken" /> is the ResourceToken obtained from the permission feed for the user.
<para>
Using Direct connectivity, wherever possible, is recommended.
</para></remarks>
<altmember cref="T:System.Uri" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConsistencyLevel" />
<altmember cref="T:Newtonsoft.Json.JsonSerializerSettings" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DocumentClient (Uri serviceEndpoint, string authKeyOrResourceToken, Newtonsoft.Json.JsonSerializerSettings serializerSettings, Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy = null, Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri serviceEndpoint, string authKeyOrResourceToken, class Newtonsoft.Json.JsonSerializerSettings serializerSettings, class Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, valuetype System.Nullable`1&lt;valuetype Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.#ctor(System.Uri,System.String,Newtonsoft.Json.JsonSerializerSettings,Microsoft.Azure.Documents.Client.ConnectionPolicy,System.Nullable{Microsoft.Azure.Documents.ConsistencyLevel})" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Documents.Client.DocumentClient : Uri * string * Newtonsoft.Json.JsonSerializerSettings * Microsoft.Azure.Documents.Client.ConnectionPolicy * Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; -&gt; Microsoft.Azure.Documents.Client.DocumentClient" Usage="new Microsoft.Azure.Documents.Client.DocumentClient (serviceEndpoint, authKeyOrResourceToken, serializerSettings, connectionPolicy, desiredConsistencyLevel)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="serviceEndpoint" Type="System.Uri" />
<Parameter Name="authKeyOrResourceToken" Type="System.String" />
<Parameter Name="serializerSettings" Type="Newtonsoft.Json.JsonSerializerSettings" />
<Parameter Name="connectionPolicy" Type="Microsoft.Azure.Documents.Client.ConnectionPolicy" />
<Parameter Name="desiredConsistencyLevel" Type="System.Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt;" />
</Parameters>
<Docs>
<param name="serviceEndpoint">The service endpoint to use to create the client.</param>
<param name="authKeyOrResourceToken">The authorization key or resource token to use to create the client.</param>
<param name="serializerSettings">The custom JsonSerializer settings to be used for serialization/derialization.</param>
<param name="connectionPolicy">(Optional) The connection policy for the client.</param>
<param name="desiredConsistencyLevel">(Optional) The default consistency policy for client operations.</param>
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Azure.Documents.Client.DocumentClient" /> class using the
specified service endpoint, an authorization key (or resource token), a connection policy
and a custom JsonSerializerSettings for the Azure Cosmos DB service.
</summary>
<remarks>
The service endpoint can be obtained from the Azure Management Portal.
If you are connecting using one of the Master Keys, these can be obtained along with the endpoint from the Azure Management Portal
If however you are connecting as a specific Azure Cosmos DB User, the value passed to <paramref name="authKeyOrResourceToken" /> is the ResourceToken obtained from the permission feed for the user.
<para>
Using Direct connectivity, wherever possible, is recommended.
</para></remarks>
<altmember cref="T:System.Uri" />
<altmember cref="T:Newtonsoft.Json.JsonSerializerSettings" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConsistencyLevel" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DocumentClient (Uri serviceEndpoint, string authKeyOrResourceToken, System.Net.Http.HttpMessageHandler handler, Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy = null, Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri serviceEndpoint, string authKeyOrResourceToken, class System.Net.Http.HttpMessageHandler handler, class Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, valuetype System.Nullable`1&lt;valuetype Microsoft.Azure.Documents.ConsistencyLevel&gt; desiredConsistencyLevel) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.#ctor(System.Uri,System.String,System.Net.Http.HttpMessageHandler,Microsoft.Azure.Documents.Client.ConnectionPolicy,System.Nullable{Microsoft.Azure.Documents.ConsistencyLevel})" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Documents.Client.DocumentClient : Uri * string * System.Net.Http.HttpMessageHandler * Microsoft.Azure.Documents.Client.ConnectionPolicy * Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt; -&gt; Microsoft.Azure.Documents.Client.DocumentClient" Usage="new Microsoft.Azure.Documents.Client.DocumentClient (serviceEndpoint, authKeyOrResourceToken, handler, connectionPolicy, desiredConsistencyLevel)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="serviceEndpoint" Type="System.Uri" />
<Parameter Name="authKeyOrResourceToken" Type="System.String" />
<Parameter Name="handler" Type="System.Net.Http.HttpMessageHandler" />
<Parameter Name="connectionPolicy" Type="Microsoft.Azure.Documents.Client.ConnectionPolicy" />
<Parameter Name="desiredConsistencyLevel" Type="System.Nullable&lt;Microsoft.Azure.Documents.ConsistencyLevel&gt;" />
</Parameters>
<Docs>
<param name="serviceEndpoint">The service endpoint to use to create the client.</param>
<param name="authKeyOrResourceToken">The authorization key or resource token to use to create the client.</param>
<param name="handler">The HTTP handler stack to use for sending requests (e.g., HttpClientHandler).</param>
<param name="connectionPolicy">(Optional) The connection policy for the client.</param>
<param name="desiredConsistencyLevel">(Optional) The default consistency policy for client operations.</param>
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Azure.Documents.Client.DocumentClient" /> class using the
specified service endpoint, an authorization key (or resource token) and a connection policy
for the Azure Cosmos DB service.
</summary>
<remarks>
The service endpoint can be obtained from the Azure Management Portal.
If you are connecting using one of the Master Keys, these can be obtained along with the endpoint from the Azure Management Portal
If however you are connecting as a specific Azure Cosmos DB User, the value passed to <paramref name="authKeyOrResourceToken" /> is the ResourceToken obtained from the permission feed for the user.
<para>
Using Direct connectivity, wherever possible, is recommended.
</para></remarks>
<altmember cref="T:System.Uri" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" />
<altmember cref="P:Microsoft.Azure.Documents.Client.DocumentClient.ConsistencyLevel" />
</Docs>
</Member>
<Member MemberName="AuthKey">
<MemberSignature Language="C#" Value="public System.Security.SecureString AuthKey { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Security.SecureString AuthKey" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.DocumentClient.AuthKey" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AuthKey As SecureString" />
<MemberSignature Language="F#" Value="member this.AuthKey : System.Security.SecureString" Usage="Microsoft.Azure.Documents.Client.DocumentClient.AuthKey" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Azure.Documents.IDocumentClient.AuthKey</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.SecureString</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the AuthKey used by the client from the Azure Cosmos DB service.
</summary>
<value>
The AuthKey used by the client.
</value>
<remarks>To be added.</remarks>
<altmember cref="T:System.Security.SecureString" />
</Docs>
</Member>
<Member MemberName="ConnectionPolicy">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.Client.ConnectionPolicy ConnectionPolicy { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Documents.Client.ConnectionPolicy ConnectionPolicy" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ConnectionPolicy As ConnectionPolicy" />
<MemberSignature Language="F#" Value="member this.ConnectionPolicy : Microsoft.Azure.Documents.Client.ConnectionPolicy" Usage="Microsoft.Azure.Documents.Client.DocumentClient.ConnectionPolicy" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Azure.Documents.IDocumentClient.ConnectionPolicy</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Documents.Client.ConnectionPolicy</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the Connection policy used by the client from the Azure Cosmos DB service.
</summary>
<value>
The Connection policy used by the client.
</value>
<remarks>To be added.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Client.ConnectionPolicy" />
</Docs>
</Member>
<Member MemberName="ConsistencyLevel">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.ConsistencyLevel ConsistencyLevel { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype Microsoft.Azure.Documents.ConsistencyLevel ConsistencyLevel" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.DocumentClient.ConsistencyLevel" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ConsistencyLevel As ConsistencyLevel" />
<MemberSignature Language="F#" Value="member this.ConsistencyLevel : Microsoft.Azure.Documents.ConsistencyLevel" Usage="Microsoft.Azure.Documents.Client.DocumentClient.ConsistencyLevel" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Azure.Documents.IDocumentClient.ConsistencyLevel</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Documents.ConsistencyLevel</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the configured consistency level of the client from the Azure Cosmos DB service.
</summary>
<value>
The configured <see cref="T:Microsoft.Azure.Documents.ConsistencyLevel" /> of the client.
</value>
<remarks>To be added.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.ConsistencyLevel" />
</Docs>
</Member>
<Member MemberName="CreateAttachmentAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt; CreateAttachmentAsync (string documentLink, object attachment, Microsoft.Azure.Documents.Client.RequestOptions options = null, System.Threading.CancellationToken cancellationToken = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;class Microsoft.Azure.Documents.Attachment&gt;&gt; CreateAttachmentAsync(string documentLink, object attachment, class Microsoft.Azure.Documents.Client.RequestOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentAsync(System.String,System.Object,Microsoft.Azure.Documents.Client.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentAsync : string * obj * Microsoft.Azure.Documents.Client.RequestOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt;&#xA;override this.CreateAttachmentAsync : string * obj * Microsoft.Azure.Documents.Client.RequestOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt;" Usage="documentClient.CreateAttachmentAsync (documentLink, attachment, options, cancellationToken)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentAsync(System.String,System.Object,Microsoft.Azure.Documents.Client.RequestOptions,System.Threading.CancellationToken)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="documentLink" Type="System.String" />
<Parameter Name="attachment" Type="System.Object" />
<Parameter Name="options" Type="Microsoft.Azure.Documents.Client.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="documentLink">The link of the parent document for this new attachment. E.g. dbs/db_rid/colls/col_rid/docs/doc_rid/ </param>
<param name="attachment">The attachment object.</param>
<param name="options">(Optional) The request options for the request.</param>
<param name="cancellationToken">(Optional) A <see cref="T:System.Threading.CancellationToken" /> that can be used by other objects or threads to receive notice of cancellation.</param>
<summary>
Creates an attachment as an asychronous operation in the Azure Cosmos DB service.
</summary>
<returns>
The <see cref="T:System.Threading.Tasks.Task" /> object representing the service response for the asynchronous operation.
</returns>
<remarks />
<altmember cref="T:Microsoft.Azure.Documents.Attachment" />
<altmember cref="T:Microsoft.Azure.Documents.Client.RequestOptions" />
<altmember cref="T:Microsoft.Azure.Documents.Client.ResourceResponse`1" />
<altmember cref="T:System.Threading.Tasks.Task" />
<example>
The example below creates a new document, and then creates a new attachment for that document
<code language="c#"><![CDATA[
dynamic d = new
{
id = "DOC1800243243470"
};
Document doc = await client.CreateDocumentAsync(collectionSelfLink, d);
//Create an Attachment which links to binary content stored somewhere else
//Use the MediaLink property of Attachment to set where the binary resides
//MediaLink can also point at another Attachment within Azure Cosmos DB.
Attachment a = await client.CreateAttachmentAsync(doc.SelfLink, new Attachment { Id = "foo", ContentType = "text/plain", MediaLink = "link to your media" });
//Because Attachment is a Dynamic object you can use SetPropertyValue method to any property you like
//Even if that property doesn't exist. Here we are creating two new properties on the Attachment we created above.
a.SetPropertyValue("Foo", "some value");
a.SetPropertyValue("Bar", "some value");
//Now update the Attachment object in the database to persist the new properties on the object
client.ReplaceAttachmentAsync(a);
//Let's now create another Attachment except this time we're going to use a Dynamic object instead
//of a <see cref="Microsoft.Azure.Documents.Attachment"/> as we did above.
var b = await client.CreateAttachmentAsync(doc.SelfLink, new { id = "foo", contentType = "text/plain", media="link to your media", a = 5, b = 6 });
//Now you will have a Document in your database with two attachments.
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateAttachmentAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt; CreateAttachmentAsync (Uri documentUri, object attachment, Microsoft.Azure.Documents.Client.RequestOptions options = null, System.Threading.CancellationToken cancellationToken = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;class Microsoft.Azure.Documents.Attachment&gt;&gt; CreateAttachmentAsync(class System.Uri documentUri, object attachment, class Microsoft.Azure.Documents.Client.RequestOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentAsync(System.Uri,System.Object,Microsoft.Azure.Documents.Client.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentAsync : Uri * obj * Microsoft.Azure.Documents.Client.RequestOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt;&#xA;override this.CreateAttachmentAsync : Uri * obj * Microsoft.Azure.Documents.Client.RequestOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt;" Usage="documentClient.CreateAttachmentAsync (documentUri, attachment, options, cancellationToken)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentAsync(System.Uri,System.Object,Microsoft.Azure.Documents.Client.RequestOptions,System.Threading.CancellationToken)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="documentUri" Type="System.Uri" />
<Parameter Name="attachment" Type="System.Object" />
<Parameter Name="options" Type="Microsoft.Azure.Documents.Client.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="documentUri">the URI of the document to create an attachment for.</param>
<param name="attachment">the attachment object.</param>
<param name="options">The request options for the request.</param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Creates an attachment as an asychronous operation in the Azure Cosmos DB service.
</summary>
<returns>The task object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateAttachmentAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt; CreateAttachmentAsync (string attachmentsLink, System.IO.Stream mediaStream, Microsoft.Azure.Documents.Client.MediaOptions options = null, Microsoft.Azure.Documents.Client.RequestOptions requestOptions = null, System.Threading.CancellationToken cancellationToken = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;class Microsoft.Azure.Documents.Attachment&gt;&gt; CreateAttachmentAsync(string attachmentsLink, class System.IO.Stream mediaStream, class Microsoft.Azure.Documents.Client.MediaOptions options, class Microsoft.Azure.Documents.Client.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentAsync(System.String,System.IO.Stream,Microsoft.Azure.Documents.Client.MediaOptions,Microsoft.Azure.Documents.Client.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentAsync : string * System.IO.Stream * Microsoft.Azure.Documents.Client.MediaOptions * Microsoft.Azure.Documents.Client.RequestOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt;&#xA;override this.CreateAttachmentAsync : string * System.IO.Stream * Microsoft.Azure.Documents.Client.MediaOptions * Microsoft.Azure.Documents.Client.RequestOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt;" Usage="documentClient.CreateAttachmentAsync (attachmentsLink, mediaStream, options, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentAsync(System.String,System.IO.Stream,Microsoft.Azure.Documents.Client.MediaOptions,Microsoft.Azure.Documents.Client.RequestOptions,System.Threading.CancellationToken)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="attachmentsLink" Type="System.String" />
<Parameter Name="mediaStream" Type="System.IO.Stream" />
<Parameter Name="options" Type="Microsoft.Azure.Documents.Client.MediaOptions" />
<Parameter Name="requestOptions" Type="Microsoft.Azure.Documents.Client.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="attachmentsLink">The attachments link for the document. E.g. dbs/db_rid/colls/col_rid/docs/doc_rid/attachments/ </param>
<param name="mediaStream">the <see cref="T:System.IO.Stream" /> of the attachment media.</param>
<param name="options">the <see cref="T:Microsoft.Azure.Documents.Client.MediaOptions" /> for the request.</param>
<param name="requestOptions">Request options.</param>
<param name="cancellationToken">(Optional) A <see cref="T:System.Threading.CancellationToken" /> that can be used by other objects or threads to receive notice of cancellation.</param>
<summary>
Creates an <see cref="T:Microsoft.Azure.Documents.Attachment" /> with the contents of the provided <paramref name="mediaStream" /> as an asynchronous operation
in the Azure Cosmos DB service.
</summary>
<returns>The task object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If either <paramref name="attachmentsLink" /> or <paramref name="mediaStream" /> is not set.</exception>
<altmember cref="T:Microsoft.Azure.Documents.Attachment" />
<altmember cref="T:Microsoft.Azure.Documents.Client.ResourceResponse`1" />
<altmember cref="T:System.IO.Stream" />
<altmember cref="T:System.Threading.Tasks.Task" />
<example>
<code language="c#"><![CDATA[
//This attachment could be any binary you want to attach. Like images, videos, word documents, pdfs etc. it doesn't matter
using (FileStream fileStream = new FileStream(@".\something.pdf", FileMode.Open))
{
//Create the attachment
Attachment attachment = await client.CreateAttachmentAsync("dbs/db_rid/colls/coll_rid/docs/doc_rid/attachments/",
fileStream,
new MediaOptions
{
ContentType = "application/pdf",
Slug = "something.pdf"
});
}
]]></code>
</example>
</Docs>
</Member>
<Member MemberName="CreateAttachmentAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt; CreateAttachmentAsync (Uri documentUri, System.IO.Stream mediaStream, Microsoft.Azure.Documents.Client.MediaOptions options = null, Microsoft.Azure.Documents.Client.RequestOptions requestOptions = null, System.Threading.CancellationToken cancellationToken = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;class Microsoft.Azure.Documents.Attachment&gt;&gt; CreateAttachmentAsync(class System.Uri documentUri, class System.IO.Stream mediaStream, class Microsoft.Azure.Documents.Client.MediaOptions options, class Microsoft.Azure.Documents.Client.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentAsync(System.Uri,System.IO.Stream,Microsoft.Azure.Documents.Client.MediaOptions,Microsoft.Azure.Documents.Client.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentAsync : Uri * System.IO.Stream * Microsoft.Azure.Documents.Client.MediaOptions * Microsoft.Azure.Documents.Client.RequestOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt;&#xA;override this.CreateAttachmentAsync : Uri * System.IO.Stream * Microsoft.Azure.Documents.Client.MediaOptions * Microsoft.Azure.Documents.Client.RequestOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt;" Usage="documentClient.CreateAttachmentAsync (documentUri, mediaStream, options, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentAsync(System.Uri,System.IO.Stream,Microsoft.Azure.Documents.Client.MediaOptions,Microsoft.Azure.Documents.Client.RequestOptions,System.Threading.CancellationToken)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Attachment&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="documentUri" Type="System.Uri" />
<Parameter Name="mediaStream" Type="System.IO.Stream" />
<Parameter Name="options" Type="Microsoft.Azure.Documents.Client.MediaOptions" />
<Parameter Name="requestOptions" Type="Microsoft.Azure.Documents.Client.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="documentUri">the URI of the document to create an attachment for.</param>
<param name="mediaStream">the stream of the attachment media.</param>
<param name="options">the media options for the request.</param>
<param name="requestOptions">The request options for the request.</param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Creates an attachment as an asynchronous operation in the Azure Cosmos DB service.
</summary>
<returns>The task object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateAttachmentQuery">
<MemberSignature Language="C#" Value="public System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Attachment&gt; CreateAttachmentQuery (string documentLink, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IOrderedQueryable`1&lt;class Microsoft.Azure.Documents.Attachment&gt; CreateAttachmentQuery(string documentLink, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentQuery(System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Attachment&gt;&#xA;override this.CreateAttachmentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Attachment&gt;" Usage="documentClient.CreateAttachmentQuery (documentLink, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentQuery(System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Attachment&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="documentLink" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="documentLink">The link to the parent document</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for attachments in the Azure Cosmos DB service. It returns an IOrderedQueryable{Attachment}.
</summary>
<returns>An IOrderedQueryable{Attachments} that can evaluate the query with the provided SQL statement.</returns>
<remarks>To be added.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Attachment" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for plain text attachments using LINQ.
<code language="c#"><![CDATA[
foreach (Attachment attachment in client.CreateAttachmentQuery(document.SelfLink).Where(a => a.ContentType == "text/plain"))
{
Console.WriteLine("Id: {0}, MediaLink:{1}", attachment.Id, attachment.MediaLink);
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateAttachmentQuery">
<MemberSignature Language="C#" Value="public System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Attachment&gt; CreateAttachmentQuery (Uri attachmentsUri, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IOrderedQueryable`1&lt;class Microsoft.Azure.Documents.Attachment&gt; CreateAttachmentQuery(class System.Uri attachmentsUri, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentQuery(System.Uri,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Attachment&gt;&#xA;override this.CreateAttachmentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Attachment&gt;" Usage="documentClient.CreateAttachmentQuery (attachmentsUri, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentQuery(System.Uri,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Attachment&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="attachmentsUri" Type="System.Uri" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="attachmentsUri">the URI to the attachments.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for attachments in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateAttachmentQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateAttachmentQuery (string documentLink, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateAttachmentQuery(string documentLink, class Microsoft.Azure.Documents.SqlQuerySpec querySpec, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentQuery(System.String,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateAttachmentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateAttachmentQuery (documentLink, querySpec, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentQuery(System.String,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="documentLink" Type="System.String" />
<Parameter Name="querySpec" Type="Microsoft.Azure.Documents.SqlQuerySpec" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="documentLink">The link to the parent document resource.</param>
<param name="querySpec">The SqlQuerySpec instance containing the SQL expression.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for attachments in the Azure Cosmos DB service by using a SQL statement with parameterized values. It returns an IQueryable{dynamic}.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Microsoft.Azure.Documents.SqlQuerySpec" />.
</summary>
<returns>An IQueryable{dynamic} that can evaluate the query with the provided SQL statement.</returns>
<remarks>Refer to https://msdn.microsoft.com/en-us/library/azure/dn782250.aspx and http://azure.microsoft.com/documentation/articles/documentdb-sql-query/ for syntax and examples.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Attachment" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for plain text attachments using a parameterized SQL query string.
<code language="c#"><![CDATA[
var query = new SqlQuerySpec(
"SELECT * FROM attachments a WHERE a.priority = @priority",
new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@priority", Value = 0 } }));
foreach (dynamic attachment in client.CreateAttachmentQuery<dynamic>(document.SelfLink, query))
{
Console.WriteLine("Id: {0}, Priority:{1}", attachment.id, attachment.priority);
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateAttachmentQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateAttachmentQuery (string documentLink, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateAttachmentQuery(string documentLink, string sqlExpression, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentQuery(System.String,System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateAttachmentQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateAttachmentQuery (documentLink, sqlExpression, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentQuery(System.String,System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="documentLink" Type="System.String" />
<Parameter Name="sqlExpression" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="documentLink">The link to the parent document.</param>
<param name="sqlExpression">The SQL statement.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for attachments in the Azure Cosmos DB service by using a SQL statement. It returns an IQueryable{dynamic}.
</summary>
<returns>An IQueryable{dynamic} that can evaluate the query with the provided SQL statement.</returns>
<remarks>Refer to https://msdn.microsoft.com/en-us/library/azure/dn782250.aspx and http://azure.microsoft.com/documentation/articles/documentdb-sql-query/ for syntax and examples.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Attachment" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
<code language="c#"><![CDATA[
foreach (Attachment attachment in client.CreateAttachmentQuery<dynamic>(
document.SelfLink,
"SELECT * FROM attachments a WHERE a.priority = 0"))
{
Console.WriteLine("Id: {0}, Priority:{1}", attachment.id, attachment.priority);
}
]]></code>
</example>
</Docs>
</Member>
<Member MemberName="CreateAttachmentQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateAttachmentQuery (Uri attachmentsUri, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateAttachmentQuery(class System.Uri attachmentsUri, class Microsoft.Azure.Documents.SqlQuerySpec querySpec, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentQuery(System.Uri,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateAttachmentQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateAttachmentQuery (attachmentsUri, querySpec, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentQuery(System.Uri,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="attachmentsUri" Type="System.Uri" />
<Parameter Name="querySpec" Type="Microsoft.Azure.Documents.SqlQuerySpec" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="attachmentsUri">the URI to the attachments.</param>
<param name="querySpec">The sql query.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for attachments in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateAttachmentQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateAttachmentQuery (Uri attachmentsUri, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateAttachmentQuery(class System.Uri attachmentsUri, string sqlExpression, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentQuery(System.Uri,System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateAttachmentQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateAttachmentQuery (attachmentsUri, sqlExpression, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentQuery(System.Uri,System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="attachmentsUri" Type="System.Uri" />
<Parameter Name="sqlExpression" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="attachmentsUri">the URI to the attachments.</param>
<param name="sqlExpression">The sql query.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for attachments in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateAttachmentQuery&lt;T&gt;">
<MemberSignature Language="C#" Value="public System.Linq.IOrderedQueryable&lt;T&gt; CreateAttachmentQuery&lt;T&gt; (string documentLink, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IOrderedQueryable`1&lt;!!T&gt; CreateAttachmentQuery&lt;T&gt;(string documentLink, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentQuery``1(System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;'T&gt;&#xA;override this.CreateAttachmentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;'T&gt;" Usage="documentClient.CreateAttachmentQuery (documentLink, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentQuery``1(System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IOrderedQueryable&lt;T&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="documentLink" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<typeparam name="T">The type of object to query.</typeparam>
<param name="documentLink">The link of the parent document.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for attachments in the Azure Cosmos DB service.
</summary>
<returns>An IOrderedQueryable{T} that can evaluate the query.</returns>
<remarks>To be added.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Attachment" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries against attachments of custom types.
<code language="c#"><![CDATA[
public class PriorityAttachment : Attachment
{
[JsonProperty("priority")]
public int Priority;
}
foreach (PriorityAttachment attachment in
client.CreateAttachmentQuery<PriorityAttachment>(document.SelfLink).Where(a => a.Priority == 0))
{
Console.WriteLine("Id: {0}, MediaLink:{1}", attachment.Id, attachment.MediaLink);
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateAttachmentQuery&lt;T&gt;">
<MemberSignature Language="C#" Value="public System.Linq.IOrderedQueryable&lt;T&gt; CreateAttachmentQuery&lt;T&gt; (Uri attachmentsUri, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IOrderedQueryable`1&lt;!!T&gt; CreateAttachmentQuery&lt;T&gt;(class System.Uri attachmentsUri, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentQuery``1(System.Uri,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;'T&gt;&#xA;override this.CreateAttachmentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;'T&gt;" Usage="documentClient.CreateAttachmentQuery (attachmentsUri, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentQuery``1(System.Uri,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IOrderedQueryable&lt;T&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="attachmentsUri" Type="System.Uri" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<typeparam name="T">the type of object to query.</typeparam>
<param name="attachmentsUri">the URI to the attachments.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for attachments in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateAttachmentQuery&lt;T&gt;">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;T&gt; CreateAttachmentQuery&lt;T&gt; (string documentLink, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;!!T&gt; CreateAttachmentQuery&lt;T&gt;(string documentLink, class Microsoft.Azure.Documents.SqlQuerySpec querySpec, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentQuery``1(System.String,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;'T&gt;&#xA;override this.CreateAttachmentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;'T&gt;" Usage="documentClient.CreateAttachmentQuery (documentLink, querySpec, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentQuery``1(System.String,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;T&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="documentLink" Type="System.String" />
<Parameter Name="querySpec" Type="Microsoft.Azure.Documents.SqlQuerySpec" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="documentLink">The link of the parent document.</param>
<param name="querySpec">The SqlQuerySpec instance containing the SQL expression.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for attachments in the Azure Cosmos DB service by using a SQL statement with parameterized values.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Microsoft.Azure.Documents.SqlQuerySpec" />.
</summary>
<returns>An IQueryable{T} that can evaluate the query with the provided SQL statement.</returns>
<remarks>Refer to https://msdn.microsoft.com/en-us/library/azure/dn782250.aspx and http://azure.microsoft.com/documentation/articles/documentdb-sql-query/ for syntax and examples.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Attachment" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for plain text attachments using a parameterized SQL query string.
<code language="c#"><![CDATA[
var query = new SqlQuerySpec(
"SELECT * FROM attachments a WHERE a.contentType = @contentType",
new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@contentType", Value = "text/plain" } }));
foreach (Attachment attachment in client.CreateAttachmentQuery(document.SelfLink, query))
{
Console.WriteLine("Id: {0}, MediaLink:{1}", attachment.Id, attachment.MediaLink);
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateAttachmentQuery&lt;T&gt;">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;T&gt; CreateAttachmentQuery&lt;T&gt; (string documentLink, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;!!T&gt; CreateAttachmentQuery&lt;T&gt;(string documentLink, string sqlExpression, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentQuery``1(System.String,System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;'T&gt;&#xA;override this.CreateAttachmentQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;'T&gt;" Usage="documentClient.CreateAttachmentQuery (documentLink, sqlExpression, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentQuery``1(System.String,System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;T&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="documentLink" Type="System.String" />
<Parameter Name="sqlExpression" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="documentLink">The link of the parent document.</param>
<param name="sqlExpression">The SQL statement.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for attachments in the Azure Cosmos DB service by using a SQL statement.
</summary>
<returns>An IQueryable{T} that can evaluate the query with the provided SQL statement.</returns>
<remarks>Refer to https://msdn.microsoft.com/en-us/library/azure/dn782250.aspx and http://azure.microsoft.com/documentation/articles/documentdb-sql-query/ for syntax and examples.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Attachment" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for plain text attachments using a SQL query string.
<code language="c#"><![CDATA[
foreach (Attachment attachment in client.CreateAttachmentQuery(
document.SelfLink,
"SELECT * FROM attachments a WHERE a.contentType = 'text/plain'"))
{
Console.WriteLine("Id: {0}, MediaLink:{1}", attachment.Id, attachment.MediaLink);
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateAttachmentQuery&lt;T&gt;">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;T&gt; CreateAttachmentQuery&lt;T&gt; (Uri attachmentsUri, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;!!T&gt; CreateAttachmentQuery&lt;T&gt;(class System.Uri attachmentsUri, class Microsoft.Azure.Documents.SqlQuerySpec querySpec, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentQuery``1(System.Uri,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;'T&gt;&#xA;override this.CreateAttachmentQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;'T&gt;" Usage="documentClient.CreateAttachmentQuery (attachmentsUri, querySpec, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentQuery``1(System.Uri,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;T&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="attachmentsUri" Type="System.Uri" />
<Parameter Name="querySpec" Type="Microsoft.Azure.Documents.SqlQuerySpec" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="attachmentsUri">the URI to the attachments.</param>
<param name="querySpec">The sql query.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for attachments in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateAttachmentQuery&lt;T&gt;">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;T&gt; CreateAttachmentQuery&lt;T&gt; (Uri attachmentsUri, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;!!T&gt; CreateAttachmentQuery&lt;T&gt;(class System.Uri attachmentsUri, string sqlExpression, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateAttachmentQuery``1(System.Uri,System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateAttachmentQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;'T&gt;&#xA;override this.CreateAttachmentQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;'T&gt;" Usage="documentClient.CreateAttachmentQuery (attachmentsUri, sqlExpression, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateAttachmentQuery``1(System.Uri,System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;T&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="attachmentsUri" Type="System.Uri" />
<Parameter Name="sqlExpression" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="attachmentsUri">the URI to the attachments.</param>
<param name="sqlExpression">The sql query.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for attachments in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateConflictQuery">
<MemberSignature Language="C#" Value="public System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Conflict&gt; CreateConflictQuery (string collectionLink, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IOrderedQueryable`1&lt;class Microsoft.Azure.Documents.Conflict&gt; CreateConflictQuery(string collectionLink, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateConflictQuery(System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateConflictQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Conflict&gt;&#xA;override this.CreateConflictQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Conflict&gt;" Usage="documentClient.CreateConflictQuery (collectionLink, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateConflictQuery(System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Conflict&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="collectionLink" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="collectionLink">The link to the parent collection resource.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for conflicts under a collection in an Azure Cosmos DB service. It returns An IOrderedQueryable{Conflict}.
</summary>
<returns>An IOrderedQueryable{Conflict} that can evaluate the query with the provided SQL statement.</returns>
<remarks>To be added.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Conflict" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for conflicts by id.
<code language="c#"><![CDATA[
Conflict conflict = client.CreateConflictQuery(collectionLink).Where(c => c.Id == "summary").AsEnumerable().FirstOrDefault();
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateConflictQuery">
<MemberSignature Language="C#" Value="public System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Conflict&gt; CreateConflictQuery (Uri conflictsUri, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IOrderedQueryable`1&lt;class Microsoft.Azure.Documents.Conflict&gt; CreateConflictQuery(class System.Uri conflictsUri, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateConflictQuery(System.Uri,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateConflictQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Conflict&gt;&#xA;override this.CreateConflictQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Conflict&gt;" Usage="documentClient.CreateConflictQuery (conflictsUri, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateConflictQuery(System.Uri,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Conflict&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="conflictsUri" Type="System.Uri" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="conflictsUri">the URI to the conflicts.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for conflicts in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateConflictQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateConflictQuery (string collectionLink, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateConflictQuery(string collectionLink, class Microsoft.Azure.Documents.SqlQuerySpec querySpec, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateConflictQuery(System.String,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateConflictQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateConflictQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateConflictQuery (collectionLink, querySpec, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateConflictQuery(System.String,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="collectionLink" Type="System.String" />
<Parameter Name="querySpec" Type="Microsoft.Azure.Documents.SqlQuerySpec" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="collectionLink">The link to the parent collection resource.</param>
<param name="querySpec">The SqlQuerySpec instance containing the SQL expression.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for conflicts under a collection in an Azure Cosmos DB database with parameterized values. It returns an IQueryable{dynamic}.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Microsoft.Azure.Documents.SqlQuerySpec" />.
</summary>
<returns>An IQueryable{dynamic} that can evaluate the query with the provided SQL statement.</returns>
<remarks>Refer to https://msdn.microsoft.com/en-us/library/azure/dn782250.aspx and http://azure.microsoft.com/documentation/articles/documentdb-sql-query/ for syntax and examples.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Document" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for conflicts by id.
<code language="c#"><![CDATA[
var query = new SqlQuerySpec("SELECT * FROM conflicts c WHERE c.id = @id", new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@id", Value = "summary" }}));
dynamic conflict = client.CreateConflictQuery<dynamic>(collectionLink, query).AsEnumerable().FirstOrDefault();
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateConflictQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateConflictQuery (string collectionLink, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateConflictQuery(string collectionLink, string sqlExpression, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateConflictQuery(System.String,System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateConflictQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateConflictQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateConflictQuery (collectionLink, sqlExpression, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateConflictQuery(System.String,System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="collectionLink" Type="System.String" />
<Parameter Name="sqlExpression" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="collectionLink">The link to the parent collection resource.</param>
<param name="sqlExpression">The SQL statement.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for conflicts under a collection in an Azure Cosmos DB service. It returns an IQueryable{Conflict}.
</summary>
<returns>An IQueryable{dynamic} that can evaluate the query with the the provided SQL statement.</returns>
<remarks>Refer to https://msdn.microsoft.com/en-us/library/azure/dn782250.aspx and http://azure.microsoft.com/documentation/articles/documentdb-sql-query/ for syntax and examples.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Conflict" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for conflicts by id.
<code language="c#"><![CDATA[
var query = new SqlQuerySpec("SELECT * FROM conflicts c WHERE c.id = @id", new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@id", Value = "summary" }}));
Conflict conflict = client.CreateConflictQuery(collectionLink, query).AsEnumerable().FirstOrDefault();
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateConflictQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateConflictQuery (Uri conflictsUri, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateConflictQuery(class System.Uri conflictsUri, class Microsoft.Azure.Documents.SqlQuerySpec querySpec, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateConflictQuery(System.Uri,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateConflictQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateConflictQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateConflictQuery (conflictsUri, querySpec, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateConflictQuery(System.Uri,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="conflictsUri" Type="System.Uri" />
<Parameter Name="querySpec" Type="Microsoft.Azure.Documents.SqlQuerySpec" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="conflictsUri">the URI to the conflicts.</param>
<param name="querySpec">The sql query.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for conflicts in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateConflictQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateConflictQuery (Uri conflictsUri, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateConflictQuery(class System.Uri conflictsUri, string sqlExpression, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateConflictQuery(System.Uri,System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateConflictQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateConflictQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateConflictQuery (conflictsUri, sqlExpression, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateConflictQuery(System.Uri,System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="conflictsUri" Type="System.Uri" />
<Parameter Name="sqlExpression" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="conflictsUri">the URI to the conflicts.</param>
<param name="sqlExpression">The sql query.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for conflicts in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDatabaseAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Database&gt;&gt; CreateDatabaseAsync (Microsoft.Azure.Documents.Database database, Microsoft.Azure.Documents.Client.RequestOptions options = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;class Microsoft.Azure.Documents.Database&gt;&gt; CreateDatabaseAsync(class Microsoft.Azure.Documents.Database database, class Microsoft.Azure.Documents.Client.RequestOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDatabaseAsync(Microsoft.Azure.Documents.Database,Microsoft.Azure.Documents.Client.RequestOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDatabaseAsync : Microsoft.Azure.Documents.Database * Microsoft.Azure.Documents.Client.RequestOptions -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Database&gt;&gt;&#xA;override this.CreateDatabaseAsync : Microsoft.Azure.Documents.Database * Microsoft.Azure.Documents.Client.RequestOptions -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Database&gt;&gt;" Usage="documentClient.CreateDatabaseAsync (database, options)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDatabaseAsync(Microsoft.Azure.Documents.Database,Microsoft.Azure.Documents.Client.RequestOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Database&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="database" Type="Microsoft.Azure.Documents.Database" />
<Parameter Name="options" Type="Microsoft.Azure.Documents.Client.RequestOptions" />
</Parameters>
<Docs>
<param name="database">The specification for the <see cref="T:Microsoft.Azure.Documents.Database" /> to create.</param>
<param name="options">(Optional) The <see cref="T:Microsoft.Azure.Documents.Client.RequestOptions" /> for the request.</param>
<summary>
Creates a database resource as an asychronous operation in the Azure Cosmos DB service.
</summary>
<returns>The <see cref="T:Microsoft.Azure.Documents.Database" /> that was created within a task object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If <paramref name="database" /> is not set.</exception>
<exception cref="T:System.AggregateException">Represents a consolidation of failures that occured during async processing. Look within InnerExceptions to find the actual exception(s).</exception>
<exception cref="T:Microsoft.Azure.Documents.DocumentClientException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Database are:
<list type="table"><listheader><term>StatusCode</term><description>Reason for exception</description></listheader><item><term>400</term><description>BadRequest - This means something was wrong with the database object supplied. It is likely that an id was not supplied for the new Database.</description></item><item><term>409</term><description>Conflict - This means a <see cref="T:Microsoft.Azure.Documents.Database" /> with an id matching the id field of <paramref name="database" /> already existed.</description></item></list></exception>
<altmember cref="T:Microsoft.Azure.Documents.Database" />
<altmember cref="T:Microsoft.Azure.Documents.Client.RequestOptions" />
<altmember cref="T:Microsoft.Azure.Documents.Client.ResourceResponse`1" />
<altmember cref="T:System.Threading.Tasks.Task" />
<example>
The example below creates a new <see cref="T:Microsoft.Azure.Documents.Database" /> with an Id property of 'MyDatabase'
This code snippet is intended to be used from within an asynchronous method as it uses the await keyword
<code language="c#"><![CDATA[
using (IDocumentClient client = new DocumentClient(new Uri("service endpoint"), "auth key"))
{
Database db = await client.CreateDatabaseAsync(new Database { Id = "MyDatabase" });
}
]]></code></example>
<example>
If you would like to construct a <see cref="T:Microsoft.Azure.Documents.Database" /> from within a synchronous method then you need to use the following code
<code language="c#"><![CDATA[
using (IDocumentClient client = new DocumentClient(new Uri("service endpoint"), "auth key"))
{
Database db = client.CreateDatabaseAsync(new Database { Id = "MyDatabase" }).Result;
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateDatabaseIfNotExistsAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Database&gt;&gt; CreateDatabaseIfNotExistsAsync (Microsoft.Azure.Documents.Database database, Microsoft.Azure.Documents.Client.RequestOptions options = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;class Microsoft.Azure.Documents.Database&gt;&gt; CreateDatabaseIfNotExistsAsync(class Microsoft.Azure.Documents.Database database, class Microsoft.Azure.Documents.Client.RequestOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDatabaseIfNotExistsAsync(Microsoft.Azure.Documents.Database,Microsoft.Azure.Documents.Client.RequestOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDatabaseIfNotExistsAsync : Microsoft.Azure.Documents.Database * Microsoft.Azure.Documents.Client.RequestOptions -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Database&gt;&gt;&#xA;override this.CreateDatabaseIfNotExistsAsync : Microsoft.Azure.Documents.Database * Microsoft.Azure.Documents.Client.RequestOptions -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Database&gt;&gt;" Usage="documentClient.CreateDatabaseIfNotExistsAsync (database, options)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDatabaseIfNotExistsAsync(Microsoft.Azure.Documents.Database,Microsoft.Azure.Documents.Client.RequestOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Database&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="database" Type="Microsoft.Azure.Documents.Database" />
<Parameter Name="options" Type="Microsoft.Azure.Documents.Client.RequestOptions" />
</Parameters>
<Docs>
<param name="database">The specification for the <see cref="T:Microsoft.Azure.Documents.Database" /> to create.</param>
<param name="options">(Optional) The <see cref="T:Microsoft.Azure.Documents.Client.RequestOptions" /> for the request.</param>
<summary>
Creates(if doesn't exist) or gets(if already exists) a database resource as an asychronous operation in the Azure Cosmos DB service.
You can check the status code from the response to determine whether the database was newly created(201) or existing database was returned(200)
</summary>
<returns>The <see cref="T:Microsoft.Azure.Documents.Database" /> that was created within a task object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If <paramref name="database" /> is not set.</exception>
<exception cref="T:System.AggregateException">Represents a consolidation of failures that occured during async processing. Look within InnerExceptions to find the actual exception(s).</exception>
<exception cref="T:Microsoft.Azure.Documents.DocumentClientException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property.</exception>
<altmember cref="T:Microsoft.Azure.Documents.Database" />
<altmember cref="T:Microsoft.Azure.Documents.Client.RequestOptions" />
<altmember cref="T:Microsoft.Azure.Documents.Client.ResourceResponse`1" />
<altmember cref="T:System.Threading.Tasks.Task" />
<example>
The example below creates a new <see cref="T:Microsoft.Azure.Documents.Database" /> with an Id property of 'MyDatabase'
This code snippet is intended to be used from within an asynchronous method as it uses the await keyword
<code language="c#"><![CDATA[
using (IDocumentClient client = new DocumentClient(new Uri("service endpoint"), "auth key"))
{
Database db = await client.CreateDatabaseIfNotExistsAsync(new Database { Id = "MyDatabase" });
}
]]></code></example>
<example>
If you would like to construct a <see cref="T:Microsoft.Azure.Documents.Database" /> from within a synchronous method then you need to use the following code
<code language="c#"><![CDATA[
using (IDocumentClient client = new DocumentClient(new Uri("service endpoint"), "auth key"))
{
Database db = client.CreateDatabaseIfNotExistsAsync(new Database { Id = "MyDatabase" }).Result;
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateDatabaseQuery">
<MemberSignature Language="C#" Value="public System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Database&gt; CreateDatabaseQuery (Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IOrderedQueryable`1&lt;class Microsoft.Azure.Documents.Database&gt; CreateDatabaseQuery(class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDatabaseQuery(Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDatabaseQuery : Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Database&gt;&#xA;override this.CreateDatabaseQuery : Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Database&gt;" Usage="documentClient.CreateDatabaseQuery feedOptions" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDatabaseQuery(Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Database&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for database resources under an account in the Azure Cosmos DB service. It returns An IOrderedQueryable{Database}.
</summary>
<returns>An IOrderedQueryable{Database} that can evaluate the query with the provided SQL statement.</returns>
<remarks>To be added.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Database" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for databases by id.
<code language="c#"><![CDATA[
Database database = client.CreateDatabaseQuery().Where(d => d.Id == "mydb").AsEnumerable().FirstOrDefault();
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateDatabaseQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateDatabaseQuery (Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateDatabaseQuery(class Microsoft.Azure.Documents.SqlQuerySpec querySpec, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDatabaseQuery(Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDatabaseQuery : Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateDatabaseQuery : Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateDatabaseQuery (querySpec, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDatabaseQuery(Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="querySpec" Type="Microsoft.Azure.Documents.SqlQuerySpec" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="querySpec">The SqlQuerySpec instance containing the SQL expression.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for database resources under an Azure Cosmos DB database account by using a SQL statement with parameterized values. It returns an IQueryable{dynamic}.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Microsoft.Azure.Documents.SqlQuerySpec" />.
</summary>
<returns>An IQueryable{dynamic} that can evaluate the query with the provided SQL statement.</returns>
<remarks>Refer to https://msdn.microsoft.com/en-us/library/azure/dn782250.aspx and http://azure.microsoft.com/documentation/articles/documentdb-sql-query/ for syntax and examples.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Database" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for databases by id.
<code language="c#"><![CDATA[
var query = new SqlQuerySpec("SELECT * FROM dbs d WHERE d.id = @id",
new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@id", Value = "mydb" }}));
dynamic database = client.CreateDatabaseQuery<dynamic>(query).AsEnumerable().FirstOrDefault();
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateDatabaseQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateDatabaseQuery (string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateDatabaseQuery(string sqlExpression, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDatabaseQuery(System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDatabaseQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateDatabaseQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateDatabaseQuery (sqlExpression, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDatabaseQuery(System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sqlExpression" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="sqlExpression">The SQL statement.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for database resources under an Azure Cosmos DB database account by using a SQL statement. It returns an IQueryable{dynamic}.
</summary>
<returns>An IQueryable{dynamic} that can evaluate the query with the provided SQL statement.</returns>
<remarks>Refer to https://msdn.microsoft.com/en-us/library/azure/dn782250.aspx and http://azure.microsoft.com/documentation/articles/documentdb-sql-query/ for syntax and examples.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Database" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for databases by id.
<code language="c#"><![CDATA[
Database database = client.CreateDatabaseQuery("SELECT * FROM dbs d WHERE d.id = 'mydb'").AsEnumerable().FirstOrDefault();
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateDocumentAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Document&gt;&gt; CreateDocumentAsync (string documentsFeedOrDatabaseLink, object document, Microsoft.Azure.Documents.Client.RequestOptions options = null, bool disableAutomaticIdGeneration = false, System.Threading.CancellationToken cancellationToken = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;class Microsoft.Azure.Documents.Document&gt;&gt; CreateDocumentAsync(string documentsFeedOrDatabaseLink, object document, class Microsoft.Azure.Documents.Client.RequestOptions options, bool disableAutomaticIdGeneration, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentAsync(System.String,System.Object,Microsoft.Azure.Documents.Client.RequestOptions,System.Boolean,System.Threading.CancellationToken)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentAsync : string * obj * Microsoft.Azure.Documents.Client.RequestOptions * bool * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Document&gt;&gt;&#xA;override this.CreateDocumentAsync : string * obj * Microsoft.Azure.Documents.Client.RequestOptions * bool * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Document&gt;&gt;" Usage="documentClient.CreateDocumentAsync (documentsFeedOrDatabaseLink, document, options, disableAutomaticIdGeneration, cancellationToken)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentAsync(System.String,System.Object,Microsoft.Azure.Documents.Client.RequestOptions,System.Boolean,System.Threading.CancellationToken)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Document&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="documentsFeedOrDatabaseLink" Type="System.String" />
<Parameter Name="document" Type="System.Object" />
<Parameter Name="options" Type="Microsoft.Azure.Documents.Client.RequestOptions" />
<Parameter Name="disableAutomaticIdGeneration" Type="System.Boolean" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="documentsFeedOrDatabaseLink">The link of the <see cref="T:Microsoft.Azure.Documents.DocumentCollection" /> to create the document in. E.g. dbs/db_rid/colls/coll_rid/ </param>
<param name="document">The document object to create.</param>
<param name="options">(Optional) Any request options you wish to set. E.g. Specifying a Trigger to execute when creating the document. <see cref="T:Microsoft.Azure.Documents.Client.RequestOptions" /></param>
<param name="disableAutomaticIdGeneration">(Optional) Disables the automatic id generation, If this is True the system will throw an exception if the id property is missing from the Document.</param>
<param name="cancellationToken">(Optional) A <see cref="T:System.Threading.CancellationToken" /> that can be used by other objects or threads to receive notice of cancellation.</param>
<summary>
Creates a Document as an asychronous operation in the Azure Cosmos DB service.
</summary>
<returns>The <see cref="T:Microsoft.Azure.Documents.Document" /> that was created contained within a <see cref="T:System.Threading.Tasks.Task" /> object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If either <paramref name="documentsFeedOrDatabaseLink" /> or <paramref name="document" /> is not set.</exception>
<exception cref="T:System.AggregateException">Represents a consolidation of failures that occured during async processing. Look within InnerExceptions to find the actual exception(s)</exception>
<exception cref="T:Microsoft.Azure.Documents.DocumentClientException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Document are:
<list type="table"><listheader><term>StatusCode</term><description>Reason for exception</description></listheader><item><term>400</term><description>BadRequest - This means something was wrong with the document supplied. It is likely that <paramref name="disableAutomaticIdGeneration" /> was true and an id was not supplied</description></item><item><term>403</term><description>Forbidden - This likely means the collection in to which you were trying to create the document is full.</description></item><item><term>409</term><description>Conflict - This means a <see cref="T:Microsoft.Azure.Documents.Document" /> with an id matching the id field of <paramref name="document" /> already existed</description></item><item><term>413</term><description>RequestEntityTooLarge - This means the <see cref="T:Microsoft.Azure.Documents.Document" /> exceeds the current max entity size. Consult documentation for limits and quotas.</description></item><item><term>429</term><description>TooManyRequests - This means you have exceeded the number of request units per second. Consult the DocumentClientException.RetryAfter value to see how long you should wait before retrying this operation.</description></item></list></exception>
<altmember cref="T:Microsoft.Azure.Documents.Document" />
<altmember cref="T:Microsoft.Azure.Documents.Client.RequestOptions" />
<altmember cref="T:Microsoft.Azure.Documents.Client.ResourceResponse`1" />
<altmember cref="T:System.Threading.Tasks.Task" />
<example>
Azure Cosmos DB supports a number of different ways to work with documents. A document can extend <see cref="T:Microsoft.Azure.Documents.Resource" /><code language="c#"><![CDATA[
public class MyObject : Resource
{
public string MyProperty {get; set;}
}
using (IDocumentClient client = new DocumentClient(new Uri("service endpoint"), "auth key"))
{
Document doc = await client.CreateDocumentAsync("dbs/db_rid/colls/coll_rid/", new MyObject { MyProperty = "A Value" });
}
]]></code></example>
<example>
A document can be any POCO object that can be serialized to JSON, even if it doesn't extend from <see cref="T:Microsoft.Azure.Documents.Resource" /><code language="c#"><![CDATA[
public class MyPOCO
{
public string MyProperty {get; set;}
}
using (IDocumentClient client = new DocumentClient(new Uri("service endpoint"), "auth key"))
{
Document doc = await client.CreateDocumentAsync("dbs/db_rid/colls/coll_rid/", new MyPOCO { MyProperty = "A Value" });
}
]]></code></example>
<example>
Finally, a Document can also be a dynamic object
<code language="c#"><![CDATA[
using (IDocumentClient client = new DocumentClient(new Uri("service endpoint"), "auth key"))
{
Document doc = await client.CreateDocumentAsync("dbs/db_rid/colls/coll_rid/", new { SomeProperty = "A Value" } );
}
]]></code></example>
<example>
Create a Document and execute a Pre and Post Trigger
<code language="c#"><![CDATA[
using (IDocumentClient client = new DocumentClient(new Uri("service endpoint"), "auth key"))
{
Document doc = await client.CreateDocumentAsync(
"dbs/db_rid/colls/coll_rid/",
new { id = "DOC123213443" },
new RequestOptions
{
PreTriggerInclude = new List<string> { "MyPreTrigger" },
PostTriggerInclude = new List<string> { "MyPostTrigger" }
});
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateDocumentAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Document&gt;&gt; CreateDocumentAsync (Uri documentCollectionUri, object document, Microsoft.Azure.Documents.Client.RequestOptions options = null, bool disableAutomaticIdGeneration = false, System.Threading.CancellationToken cancellationToken = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;class Microsoft.Azure.Documents.Document&gt;&gt; CreateDocumentAsync(class System.Uri documentCollectionUri, object document, class Microsoft.Azure.Documents.Client.RequestOptions options, bool disableAutomaticIdGeneration, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentAsync(System.Uri,System.Object,Microsoft.Azure.Documents.Client.RequestOptions,System.Boolean,System.Threading.CancellationToken)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentAsync : Uri * obj * Microsoft.Azure.Documents.Client.RequestOptions * bool * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Document&gt;&gt;&#xA;override this.CreateDocumentAsync : Uri * obj * Microsoft.Azure.Documents.Client.RequestOptions * bool * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Document&gt;&gt;" Usage="documentClient.CreateDocumentAsync (documentCollectionUri, document, options, disableAutomaticIdGeneration, cancellationToken)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentAsync(System.Uri,System.Object,Microsoft.Azure.Documents.Client.RequestOptions,System.Boolean,System.Threading.CancellationToken)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.Document&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="documentCollectionUri" Type="System.Uri" />
<Parameter Name="document" Type="System.Object" />
<Parameter Name="options" Type="Microsoft.Azure.Documents.Client.RequestOptions" />
<Parameter Name="disableAutomaticIdGeneration" Type="System.Boolean" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="documentCollectionUri">the URI of the document collection to create the document in.</param>
<param name="document">the document object.</param>
<param name="options">The request options for the request.</param>
<param name="disableAutomaticIdGeneration">Disables the automatic id generation, will throw an exception if id is missing.</param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Creates a document as an asychronous operation in the Azure Cosmos DB service.
</summary>
<returns>The task object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDocumentChangeFeedQuery">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.Linq.IDocumentQuery&lt;Microsoft.Azure.Documents.Document&gt; CreateDocumentChangeFeedQuery (string collectionLink, Microsoft.Azure.Documents.Client.ChangeFeedOptions feedOptions);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.Azure.Documents.Linq.IDocumentQuery`1&lt;class Microsoft.Azure.Documents.Document&gt; CreateDocumentChangeFeedQuery(string collectionLink, class Microsoft.Azure.Documents.Client.ChangeFeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentChangeFeedQuery(System.String,Microsoft.Azure.Documents.Client.ChangeFeedOptions)" />
<MemberSignature Language="VB.NET" Value="Public Function CreateDocumentChangeFeedQuery (collectionLink As String, feedOptions As ChangeFeedOptions) As IDocumentQuery(Of Document)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentChangeFeedQuery : string * Microsoft.Azure.Documents.Client.ChangeFeedOptions -&gt; Microsoft.Azure.Documents.Linq.IDocumentQuery&lt;Microsoft.Azure.Documents.Document&gt;&#xA;override this.CreateDocumentChangeFeedQuery : string * Microsoft.Azure.Documents.Client.ChangeFeedOptions -&gt; Microsoft.Azure.Documents.Linq.IDocumentQuery&lt;Microsoft.Azure.Documents.Document&gt;" Usage="documentClient.CreateDocumentChangeFeedQuery (collectionLink, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentChangeFeedQuery(System.String,Microsoft.Azure.Documents.Client.ChangeFeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Documents.Linq.IDocumentQuery&lt;Microsoft.Azure.Documents.Document&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="collectionLink" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.ChangeFeedOptions" />
</Parameters>
<Docs>
<param name="collectionLink">Specifies the collection to read documents from.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Overloaded. This method creates a change feed query for documents under a collection in an Azure Cosmos DB service.
</summary>
<returns>the query result set.</returns>
<remarks>ChangeFeedOptions.PartitionKeyRangeId must be provided.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery`1" />
<altmember cref="T:Microsoft.Azure.Documents.Client.ChangeFeedOptions" />
<altmember cref="T:Microsoft.Azure.Documents.PartitionKeyRange" />
<example>
<code language="c#"><![CDATA[
string partitionKeyRangeId = "0"; // Use client.ReadPartitionKeyRangeFeedAsync() to obtain the ranges.
string checkpointContinuation = null;
ChangeFeedOptions options = new ChangeFeedOptions
{
PartitionKeyRangeId = partitionKeyRangeId,
RequestContinuation = checkpointContinuation,
StartFromBeginning = true,
};
using(var query = client.CreateDocumentChangeFeedQuery(collection.SelfLink, options))
{
while (true)
{
do
{
var response = await query.ExecuteNextAsync<Document>();
if (response.Count > 0)
{
var docs = new List<Document>();
docs.AddRange(response);
// Process the documents.
// Checkpoint response.ResponseContinuation.
}
}
while (query.HasMoreResults);
Task.Delay(TimeSpan.FromMilliseconds(500)); // Or break here and use checkpointed continuation token later.
}
}
]]></code>
</example>
</Docs>
</Member>
<Member MemberName="CreateDocumentChangeFeedQuery">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.Linq.IDocumentQuery&lt;Microsoft.Azure.Documents.Document&gt; CreateDocumentChangeFeedQuery (Uri collectionLink, Microsoft.Azure.Documents.Client.ChangeFeedOptions feedOptions);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.Azure.Documents.Linq.IDocumentQuery`1&lt;class Microsoft.Azure.Documents.Document&gt; CreateDocumentChangeFeedQuery(class System.Uri collectionLink, class Microsoft.Azure.Documents.Client.ChangeFeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentChangeFeedQuery(System.Uri,Microsoft.Azure.Documents.Client.ChangeFeedOptions)" />
<MemberSignature Language="VB.NET" Value="Public Function CreateDocumentChangeFeedQuery (collectionLink As Uri, feedOptions As ChangeFeedOptions) As IDocumentQuery(Of Document)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentChangeFeedQuery : Uri * Microsoft.Azure.Documents.Client.ChangeFeedOptions -&gt; Microsoft.Azure.Documents.Linq.IDocumentQuery&lt;Microsoft.Azure.Documents.Document&gt;&#xA;override this.CreateDocumentChangeFeedQuery : Uri * Microsoft.Azure.Documents.Client.ChangeFeedOptions -&gt; Microsoft.Azure.Documents.Linq.IDocumentQuery&lt;Microsoft.Azure.Documents.Document&gt;" Usage="documentClient.CreateDocumentChangeFeedQuery (collectionLink, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentChangeFeedQuery(System.Uri,Microsoft.Azure.Documents.Client.ChangeFeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Documents.Linq.IDocumentQuery&lt;Microsoft.Azure.Documents.Document&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="collectionLink" Type="System.Uri" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.ChangeFeedOptions" />
</Parameters>
<Docs>
<param name="collectionLink">Specifies the collection to read documents from.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a change feed query for documents in the Azure Cosmos DB service.
</summary>
<returns>the query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDocumentCollectionAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt; CreateDocumentCollectionAsync (string databaseLink, Microsoft.Azure.Documents.DocumentCollection documentCollection, Microsoft.Azure.Documents.Client.RequestOptions options = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;class Microsoft.Azure.Documents.DocumentCollection&gt;&gt; CreateDocumentCollectionAsync(string databaseLink, class Microsoft.Azure.Documents.DocumentCollection documentCollection, class Microsoft.Azure.Documents.Client.RequestOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentCollectionAsync(System.String,Microsoft.Azure.Documents.DocumentCollection,Microsoft.Azure.Documents.Client.RequestOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentCollectionAsync : string * Microsoft.Azure.Documents.DocumentCollection * Microsoft.Azure.Documents.Client.RequestOptions -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt;&#xA;override this.CreateDocumentCollectionAsync : string * Microsoft.Azure.Documents.DocumentCollection * Microsoft.Azure.Documents.Client.RequestOptions -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt;" Usage="documentClient.CreateDocumentCollectionAsync (databaseLink, documentCollection, options)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentCollectionAsync(System.String,Microsoft.Azure.Documents.DocumentCollection,Microsoft.Azure.Documents.Client.RequestOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="databaseLink" Type="System.String" />
<Parameter Name="documentCollection" Type="Microsoft.Azure.Documents.DocumentCollection" />
<Parameter Name="options" Type="Microsoft.Azure.Documents.Client.RequestOptions" />
</Parameters>
<Docs>
<param name="databaseLink">The link of the database to create the collection in. E.g. dbs/db_rid/.</param>
<param name="documentCollection">The <see cref="T:Microsoft.Azure.Documents.DocumentCollection" /> object.</param>
<param name="options">(Optional) Any <see cref="T:Microsoft.Azure.Documents.Client.RequestOptions" /> you wish to provide when creating a Collection. E.g. RequestOptions.OfferThroughput = 400. </param>
<summary>
Creates a collection as an asychronous operation in the Azure Cosmos DB service.
</summary>
<returns>The <see cref="T:Microsoft.Azure.Documents.DocumentCollection" /> that was created contained within a <see cref="T:System.Threading.Tasks.Task" /> object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If either <paramref name="databaseLink" /> or <paramref name="documentCollection" /> is not set.</exception>
<exception cref="T:System.AggregateException">Represents a consolidation of failures that occured during async processing. Look within InnerExceptions to find the actual exception(s).</exception>
<exception cref="T:Microsoft.Azure.Documents.DocumentClientException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a collection are:
<list type="table"><listheader><term>StatusCode</term><description>Reason for exception</description></listheader><item><term>400</term><description>BadRequest - This means something was wrong with the request supplied. It is likely that an id was not supplied for the new collection.</description></item><item><term>403</term><description>Forbidden - This means you attempted to exceed your quota for collections. Contact support to have this quota increased.</description></item><item><term>409</term><description>Conflict - This means a <see cref="T:Microsoft.Azure.Documents.DocumentCollection" /> with an id matching the id you supplied already existed.</description></item></list></exception>
<altmember cref="T:Microsoft.Azure.Documents.DocumentCollection" />
<altmember cref="T:Microsoft.Azure.Documents.OfferV2" />
<altmember cref="T:Microsoft.Azure.Documents.Client.RequestOptions" />
<altmember cref="T:Microsoft.Azure.Documents.Client.ResourceResponse`1" />
<altmember cref="T:System.Threading.Tasks.Task" />
<example>
<code language="c#"><![CDATA[
using (IDocumentClient client = new DocumentClient(new Uri("service endpoint"), "auth key"))
{
//Create a new collection with an OfferThroughput set to 10000
//Not passing in RequestOptions.OfferThroughput will result in a collection with the default OfferThroughput set.
DocumentCollection coll = await client.CreateDocumentCollectionAsync(databaseLink,
new DocumentCollection { Id = "My Collection" },
new RequestOptions { OfferThroughput = 10000} );
}
]]></code>
</example>
</Docs>
</Member>
<Member MemberName="CreateDocumentCollectionAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt; CreateDocumentCollectionAsync (Uri databaseUri, Microsoft.Azure.Documents.DocumentCollection documentCollection, Microsoft.Azure.Documents.Client.RequestOptions options = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;class Microsoft.Azure.Documents.DocumentCollection&gt;&gt; CreateDocumentCollectionAsync(class System.Uri databaseUri, class Microsoft.Azure.Documents.DocumentCollection documentCollection, class Microsoft.Azure.Documents.Client.RequestOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentCollectionAsync(System.Uri,Microsoft.Azure.Documents.DocumentCollection,Microsoft.Azure.Documents.Client.RequestOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentCollectionAsync : Uri * Microsoft.Azure.Documents.DocumentCollection * Microsoft.Azure.Documents.Client.RequestOptions -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt;&#xA;override this.CreateDocumentCollectionAsync : Uri * Microsoft.Azure.Documents.DocumentCollection * Microsoft.Azure.Documents.Client.RequestOptions -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt;" Usage="documentClient.CreateDocumentCollectionAsync (databaseUri, documentCollection, options)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentCollectionAsync(System.Uri,Microsoft.Azure.Documents.DocumentCollection,Microsoft.Azure.Documents.Client.RequestOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="databaseUri" Type="System.Uri" />
<Parameter Name="documentCollection" Type="Microsoft.Azure.Documents.DocumentCollection" />
<Parameter Name="options" Type="Microsoft.Azure.Documents.Client.RequestOptions" />
</Parameters>
<Docs>
<param name="databaseUri">the URI of the database to create the collection in.</param>
<param name="documentCollection">the Microsoft.Azure.Documents.DocumentCollection object.</param>
<param name="options">The request options for the request.</param>
<summary>
Creates a collection as an asychronous operation in the Azure Cosmos DB service.
</summary>
<returns>The task object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDocumentCollectionIfNotExistsAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt; CreateDocumentCollectionIfNotExistsAsync (string databaseLink, Microsoft.Azure.Documents.DocumentCollection documentCollection, Microsoft.Azure.Documents.Client.RequestOptions options = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;class Microsoft.Azure.Documents.DocumentCollection&gt;&gt; CreateDocumentCollectionIfNotExistsAsync(string databaseLink, class Microsoft.Azure.Documents.DocumentCollection documentCollection, class Microsoft.Azure.Documents.Client.RequestOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentCollectionIfNotExistsAsync(System.String,Microsoft.Azure.Documents.DocumentCollection,Microsoft.Azure.Documents.Client.RequestOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentCollectionIfNotExistsAsync : string * Microsoft.Azure.Documents.DocumentCollection * Microsoft.Azure.Documents.Client.RequestOptions -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt;&#xA;override this.CreateDocumentCollectionIfNotExistsAsync : string * Microsoft.Azure.Documents.DocumentCollection * Microsoft.Azure.Documents.Client.RequestOptions -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt;" Usage="documentClient.CreateDocumentCollectionIfNotExistsAsync (databaseLink, documentCollection, options)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentCollectionIfNotExistsAsync(System.String,Microsoft.Azure.Documents.DocumentCollection,Microsoft.Azure.Documents.Client.RequestOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="databaseLink" Type="System.String" />
<Parameter Name="documentCollection" Type="Microsoft.Azure.Documents.DocumentCollection" />
<Parameter Name="options" Type="Microsoft.Azure.Documents.Client.RequestOptions" />
</Parameters>
<Docs>
<param name="databaseLink">The link of the database to create the collection in. E.g. dbs/db_rid/.</param>
<param name="documentCollection">The <see cref="T:Microsoft.Azure.Documents.DocumentCollection" /> object.</param>
<param name="options">(Optional) Any <see cref="T:Microsoft.Azure.Documents.Client.RequestOptions" /> you wish to provide when creating a Collection. E.g. RequestOptions.OfferThroughput = 400. </param>
<summary>
Creates (if doesn't exist) or gets (if already exists) a collection as an asychronous operation in the Azure Cosmos DB service.
You can check the status code from the response to determine whether the collection was newly created (201) or existing collection was returned (200).
</summary>
<returns>The <see cref="T:Microsoft.Azure.Documents.DocumentCollection" /> that was created contained within a <see cref="T:System.Threading.Tasks.Task" /> object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If either <paramref name="databaseLink" /> or <paramref name="documentCollection" /> is not set.</exception>
<exception cref="T:System.AggregateException">Represents a consolidation of failures that occured during async processing. Look within InnerExceptions to find the actual exception(s).</exception>
<exception cref="T:Microsoft.Azure.Documents.DocumentClientException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a DocumentCollection are:
<list type="table"><listheader><term>StatusCode</term><description>Reason for exception</description></listheader><item><term>400</term><description>BadRequest - This means something was wrong with the request supplied. It is likely that an id was not supplied for the new collection.</description></item><item><term>403</term><description>Forbidden - This means you attempted to exceed your quota for collections. Contact support to have this quota increased.</description></item></list></exception>
<altmember cref="T:Microsoft.Azure.Documents.DocumentCollection" />
<altmember cref="T:Microsoft.Azure.Documents.OfferV2" />
<altmember cref="T:Microsoft.Azure.Documents.Client.RequestOptions" />
<altmember cref="T:Microsoft.Azure.Documents.Client.ResourceResponse`1" />
<altmember cref="T:System.Threading.Tasks.Task" />
<example>
<code language="c#"><![CDATA[
using (IDocumentClient client = new DocumentClient(new Uri("service endpoint"), "auth key"))
{
//Create a new collection with an OfferThroughput set to 10000
//Not passing in RequestOptions.OfferThroughput will result in a collection with the default OfferThroughput set.
DocumentCollection coll = await client.CreateDocumentCollectionIfNotExistsAsync(databaseLink,
new DocumentCollection { Id = "My Collection" },
new RequestOptions { OfferThroughput = 10000} );
}
]]></code>
</example>
</Docs>
</Member>
<Member MemberName="CreateDocumentCollectionIfNotExistsAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt; CreateDocumentCollectionIfNotExistsAsync (Uri databaseUri, Microsoft.Azure.Documents.DocumentCollection documentCollection, Microsoft.Azure.Documents.Client.RequestOptions options = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Microsoft.Azure.Documents.Client.ResourceResponse`1&lt;class Microsoft.Azure.Documents.DocumentCollection&gt;&gt; CreateDocumentCollectionIfNotExistsAsync(class System.Uri databaseUri, class Microsoft.Azure.Documents.DocumentCollection documentCollection, class Microsoft.Azure.Documents.Client.RequestOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentCollectionIfNotExistsAsync(System.Uri,Microsoft.Azure.Documents.DocumentCollection,Microsoft.Azure.Documents.Client.RequestOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentCollectionIfNotExistsAsync : Uri * Microsoft.Azure.Documents.DocumentCollection * Microsoft.Azure.Documents.Client.RequestOptions -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt;&#xA;override this.CreateDocumentCollectionIfNotExistsAsync : Uri * Microsoft.Azure.Documents.DocumentCollection * Microsoft.Azure.Documents.Client.RequestOptions -&gt; System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt;" Usage="documentClient.CreateDocumentCollectionIfNotExistsAsync (databaseUri, documentCollection, options)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentCollectionIfNotExistsAsync(System.Uri,Microsoft.Azure.Documents.DocumentCollection,Microsoft.Azure.Documents.Client.RequestOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task&lt;Microsoft.Azure.Documents.Client.ResourceResponse&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="databaseUri" Type="System.Uri" />
<Parameter Name="documentCollection" Type="Microsoft.Azure.Documents.DocumentCollection" />
<Parameter Name="options" Type="Microsoft.Azure.Documents.Client.RequestOptions" />
</Parameters>
<Docs>
<param name="databaseUri">the URI of the database to create the collection in.</param>
<param name="documentCollection">The <see cref="T:Microsoft.Azure.Documents.DocumentCollection" /> object.</param>
<param name="options">(Optional) Any <see cref="T:Microsoft.Azure.Documents.Client.RequestOptions" /> you wish to provide when creating a Collection. E.g. RequestOptions.OfferThroughput = 400. </param>
<summary>
Creates(if doesn't exist) or gets(if already exists) a collection as an asychronous operation in the Azure Cosmos DB service.
</summary>
<returns>The <see cref="T:Microsoft.Azure.Documents.DocumentCollection" /> that was created contained within a <see cref="T:System.Threading.Tasks.Task" /> object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDocumentCollectionQuery">
<MemberSignature Language="C#" Value="public System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.DocumentCollection&gt; CreateDocumentCollectionQuery (string databaseLink, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IOrderedQueryable`1&lt;class Microsoft.Azure.Documents.DocumentCollection&gt; CreateDocumentCollectionQuery(string databaseLink, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentCollectionQuery(System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentCollectionQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&#xA;override this.CreateDocumentCollectionQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.DocumentCollection&gt;" Usage="documentClient.CreateDocumentCollectionQuery (databaseLink, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentCollectionQuery(System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.DocumentCollection&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="databaseLink" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="databaseLink">The link to the parent database resource.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for collections under an Azure Cosmos DB database. It returns An IOrderedQueryable{DocumentCollection}.
</summary>
<returns>An IOrderedQueryable{DocumentCollection} that can evaluate the query with the provided SQL statement.</returns>
<remarks>To be added.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.DocumentCollection" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for collections by id.
<code language="c#"><![CDATA[
DocumentCollection collection = client.CreateDocumentCollectionQuery(databaseLink).Where(c => c.Id == "myColl").AsEnumerable().FirstOrDefault();
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateDocumentCollectionQuery">
<MemberSignature Language="C#" Value="public System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.DocumentCollection&gt; CreateDocumentCollectionQuery (Uri databaseUri, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IOrderedQueryable`1&lt;class Microsoft.Azure.Documents.DocumentCollection&gt; CreateDocumentCollectionQuery(class System.Uri databaseUri, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentCollectionQuery(System.Uri,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentCollectionQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.DocumentCollection&gt;&#xA;override this.CreateDocumentCollectionQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.DocumentCollection&gt;" Usage="documentClient.CreateDocumentCollectionQuery (databaseUri, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentCollectionQuery(System.Uri,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.DocumentCollection&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="databaseUri" Type="System.Uri" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="databaseUri">the URI to the database.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for document collections in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDocumentCollectionQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateDocumentCollectionQuery (string databaseLink, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateDocumentCollectionQuery(string databaseLink, class Microsoft.Azure.Documents.SqlQuerySpec querySpec, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentCollectionQuery(System.String,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentCollectionQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateDocumentCollectionQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateDocumentCollectionQuery (databaseLink, querySpec, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentCollectionQuery(System.String,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="databaseLink" Type="System.String" />
<Parameter Name="querySpec" Type="Microsoft.Azure.Documents.SqlQuerySpec" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="databaseLink">The link to the parent database resource.</param>
<param name="querySpec">The SqlQuerySpec instance containing the SQL expression.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for collections under an Azure Cosmos DB database using a SQL statement with parameterized values. It returns an IQueryable{dynamic}.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Microsoft.Azure.Documents.SqlQuerySpec" />.
</summary>
<returns>An IQueryable{dynamic} that can evaluate the query with the provided SQL statement.</returns>
<remarks>Refer to https://msdn.microsoft.com/en-us/library/azure/dn782250.aspx and http://azure.microsoft.com/documentation/articles/documentdb-sql-query/ for syntax and examples.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.DocumentCollection" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for collections by id.
<code language="c#"><![CDATA[
var query = new SqlQuerySpec("SELECT * FROM colls c WHERE c.id = @id", new SqlParameterCollection(new SqlParameter[] { new SqlParameter { Name = "@id", Value = "mycoll" }}));
DocumentCollection collection = client.CreateDocumentCollectionQuery(databaseLink, query).AsEnumerable().FirstOrDefault();
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateDocumentCollectionQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateDocumentCollectionQuery (string databaseLink, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateDocumentCollectionQuery(string databaseLink, string sqlExpression, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentCollectionQuery(System.String,System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentCollectionQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateDocumentCollectionQuery : string * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateDocumentCollectionQuery (databaseLink, sqlExpression, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentCollectionQuery(System.String,System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="databaseLink" Type="System.String" />
<Parameter Name="sqlExpression" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="databaseLink">The link to the parent database resource.</param>
<param name="sqlExpression">The SQL statement.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for collections under an Azure Cosmos DB database using a SQL statement. It returns an IQueryable{DocumentCollection}.
</summary>
<returns>An IQueryable{dynamic} that can evaluate the query with the provided SQL statement.</returns>
<remarks>Refer to https://msdn.microsoft.com/en-us/library/azure/dn782250.aspx and http://azure.microsoft.com/documentation/articles/documentdb-sql-query/ for syntax and examples.</remarks>
<altmember cref="T:Microsoft.Azure.Documents.DocumentCollection" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for collections by id.
<code language="c#"><![CDATA[
DocumentCollection collection = client.CreateDocumentCollectionQuery(databaseLink, "SELECT * FROM colls c WHERE c.id = 'mycoll'").AsEnumerable().FirstOrDefault();
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateDocumentCollectionQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateDocumentCollectionQuery (Uri databaseUri, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateDocumentCollectionQuery(class System.Uri databaseUri, class Microsoft.Azure.Documents.SqlQuerySpec querySpec, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentCollectionQuery(System.Uri,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentCollectionQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateDocumentCollectionQuery : Uri * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateDocumentCollectionQuery (databaseUri, querySpec, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentCollectionQuery(System.Uri,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="databaseUri" Type="System.Uri" />
<Parameter Name="querySpec" Type="Microsoft.Azure.Documents.SqlQuerySpec" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="databaseUri">the URI to the database.</param>
<param name="querySpec">The sql query.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for document collections in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDocumentCollectionQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateDocumentCollectionQuery (Uri databaseUri, string sqlExpression, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateDocumentCollectionQuery(class System.Uri databaseUri, string sqlExpression, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentCollectionQuery(System.Uri,System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentCollectionQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateDocumentCollectionQuery : Uri * string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateDocumentCollectionQuery (databaseUri, sqlExpression, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentCollectionQuery(System.Uri,System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="databaseUri" Type="System.Uri" />
<Parameter Name="sqlExpression" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="databaseUri">the URI to the database.</param>
<param name="sqlExpression">The sql query.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for document collections in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDocumentQuery">
<MemberSignature Language="C#" Value="public System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Document&gt; CreateDocumentQuery (string collectionLink, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IOrderedQueryable`1&lt;class Microsoft.Azure.Documents.Document&gt; CreateDocumentQuery(string collectionLink, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentQuery(System.String,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Document&gt;&#xA;override this.CreateDocumentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Document&gt;" Usage="documentClient.CreateDocumentQuery (collectionLink, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentQuery(System.String,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Document&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="collectionLink" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="collectionLink">The link to the parent document collection.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<summary>
Overloaded. This method creates a query for documents under a collection in an Azure Cosmos DB service. It returns IOrderedQueryable{Document}.
</summary>
<returns>An IOrderedQueryable{Document} that can evaluate the query.</returns>
<remarks>
This overload should be used when the schema of the queried documents is unknown or when querying by ID and replacing/deleting documents.
Since Document is a DynamicObject, it can be dynamically cast back to the original C# object.
</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Document" />
<altmember cref="T:Microsoft.Azure.Documents.Linq.IDocumentQuery" />
<example>
This example below queries for documents by id.
<code language="c#"><![CDATA[
Document document = client.CreateDocumentQuery<Document>(collectionLink)
.Where(d => d.Id == "War and Peace").AsEnumerable().FirstOrDefault();
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateDocumentQuery">
<MemberSignature Language="C#" Value="public System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Document&gt; CreateDocumentQuery (Uri documentCollectionOrDatabaseUri, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IOrderedQueryable`1&lt;class Microsoft.Azure.Documents.Document&gt; CreateDocumentQuery(class System.Uri documentCollectionOrDatabaseUri, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentQuery(System.Uri,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Document&gt;&#xA;override this.CreateDocumentQuery : Uri * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Document&gt;" Usage="documentClient.CreateDocumentQuery (documentCollectionOrDatabaseUri, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentQuery(System.Uri,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Document&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="documentCollectionOrDatabaseUri" Type="System.Uri" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
</Parameters>
<Docs>
<param name="documentCollectionOrDatabaseUri">The URI of the document collection.</param>
<param name="feedOptions">The options for processing the query results feed.</param>
<summary>
Extension method to create a query for documents in the Azure Cosmos DB service.
</summary>
<returns>The query result set.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDocumentQuery">
<MemberSignature Language="C#" Value="public System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Document&gt; CreateDocumentQuery (string collectionLink, Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Linq.IOrderedQueryable`1&lt;class Microsoft.Azure.Documents.Document&gt; CreateDocumentQuery(string collectionLink, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions, object partitionKey) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentQuery(System.String,Microsoft.Azure.Documents.Client.FeedOptions,System.Object)" />
<MemberSignature Language="F#" Value="member this.CreateDocumentQuery : string * Microsoft.Azure.Documents.Client.FeedOptions * obj -&gt; System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Document&gt;" Usage="documentClient.CreateDocumentQuery (collectionLink, feedOptions, partitionKey)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Obsolete("Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput. Please use the override that does not take a partitionKey parameter.")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Linq.IOrderedQueryable&lt;Microsoft.Azure.Documents.Document&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="collectionLink" Type="System.String" />
<Parameter Name="feedOptions" Type="Microsoft.Azure.Documents.Client.FeedOptions" />
<Parameter Name="partitionKey" Type="System.Object" />
</Parameters>
<Docs>
<param name="collectionLink">The link to the parent document collection.
Alternatively, this can be a path link to the database when using an IPartitionResolver.</param>
<param name="feedOptions">The options for processing the query result feed. For details, see <see cref="T:Microsoft.Azure.Documents.Client.FeedOptions" /></param>
<param name="partitionKey">Optional partition key that can be used with an IPartitionResolver.</param>
<summary>
Overloaded. This method creates a query for documents under a collection in an Azure Cosmos DB service. It returns IOrderedQueryable{Document}.
</summary>
<returns>An IOrderedQueryable{Document} that can evaluate the query.</returns>
<remarks>
Support for IPartitionResolver based method overloads is now obsolete. It's recommended that you use
<a href="https://azure.microsoft.com/documentation/articles/documentdb-partition-data">Partitioned Collections</a> for higher storage and throughput.
</remarks>
</Docs>
</Member>
<Member MemberName="CreateDocumentQuery">
<MemberSignature Language="C#" Value="public System.Linq.IQueryable&lt;dynamic&gt; CreateDocumentQuery (string collectionLink, Microsoft.Azure.Documents.SqlQuerySpec querySpec, Microsoft.Azure.Documents.Client.FeedOptions feedOptions = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Linq.IQueryable`1&lt;object&gt; CreateDocumentQuery(string collectionLink, class Microsoft.Azure.Documents.SqlQuerySpec querySpec, class Microsoft.Azure.Documents.Client.FeedOptions feedOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.DocumentClient.CreateDocumentQuery(System.String,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)" />
<MemberSignature Language="F#" Value="abstract member CreateDocumentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;&#xA;override this.CreateDocumentQuery : string * Microsoft.Azure.Documents.SqlQuerySpec * Microsoft.Azure.Documents.Client.FeedOptions -&gt; System.Linq.IQueryable&lt;obj&gt;" Usage="documentClient.CreateDocumentQuery (collectionLink, querySpec, feedOptions)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Azure.Documents.IDocumentClient.CreateDocumentQuery(System.String,Microsoft.Azure.Documents.SqlQuerySpec,Microsoft.Azure.Documents.Client.FeedOptions)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.5.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Linq.IQueryable&lt;System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name=