DocumentDB APIs and SDKs
DocumentDB .NET API and SDK
|API documentation||.NET API reference documentation|
|Samples||.NET code samples|
|Get started||Get started with the DocumentDB .NET SDK|
|Web app tutorial||Web application development with DocumentDB|
|Current supported framework||Microsoft .NET Framework 4.5|
- Lowered minimum throughput on partitioned collections from 10,100 RU/s to 2500 RU/s.
- Fix for an issue wherein some of the cross-partition queries were failing in the 32-bit host process.
- Fix for an issue wherein the session container was not being updated with the token for failed requests in Gateway mode.
- Fix for an issue wherein a query with UDF calls in projection was failing in some cases.
- Client side performance fixes for increasing the read and write throughput of the requests.
- Fix for an issue wherein the session container was not being updated with the token for failed requests.
- Added support for the SDK to work in a 32-bit host process. Note that if you use cross partition queries, 64-bit host processing is recommended for improved performance.
- Improved performance for scenarios involving queries with a large number of partition key values in an IN expression.
- Populated various resource quota stats in the ResourceResponse for document collection read requests when PopulateQuotaInfo request option is set.
- Minor performance fix for the CreateDocumentCollectionIfNotExistsAsync API introduced in 1.11.0.
- Performance fix in the SDK for scenarios that involve high degree of concurrent requests.
- Support for new classes and methods to process the change feed of documents within a collection.
- Support for cross-partition query continuation and some perf improvements for cross-partition queries.
- Addition of CreateDatabaseIfNotExistsAsync and CreateDocumentCollectionIfNotExistsAsync methods.
- LINQ support for system functions: IsDefined, IsNull and IsPrimitive.
- Fix for automatic binplacing of Microsoft.Azure.Documents.ServiceInterop.dll and DocumentDB.Spatial.Sql.dll assemblies to application’s bin folder when using the Nuget package with projects that have project.json tooling.
- Support for emitting client side ETW traces which could be helpful in debugging scenarios.
- Added direct connectivity support for partitioned collections.
- Improved performance for the Bounded Staleness consistency level.
- Added Polygon and LineString DataTypes while specifying collection indexing policy for geo-fencing spatial queries.
- Added LINQ support for StringEnumConverter, IsoDateTimeConverter and UnixDateTimeConverter while translating predicates.
- Various SDK bug fixes.
- Fixed an issue that caused the following NotFoundException: The read session is not available for the input session token. This exception occurred in some cases when querying for the read-region of a geo-distributed account.
- Exposed the ResponseStream property in the ResourceResponse class, which enables direct access to the underlying stream from a response.
- Modified the ResourceResponse, FeedResponse, StoredProcedureResponse and MediaResponse classes to implement the corresponding public interface so that they can be mocked for test driven deployment (TDD).
- Fixed an issue that caused a malformed partition key header when using a custom JsonSerializerSettings object for serializing data.
- Fixed an issue that caused long running queries to fail with error: Authorization token is not valid at the current time.
- Fixed an issue that removed the original SqlParameterCollection from cross partition top/order-by queries.
- Added support for parallel queries for partitioned collections.
- Added support for cross partition ORDER BY and TOP queries for partitioned collections.
- Fixed the missing references to DocumentDB.Spatial.Sql.dll and Microsoft.Azure.Documents.ServiceInterop.dll that are required when referencing a DocumentDB project with a reference to the DocumentDB Nuget package.
- Fixed the ability to use parameters of different types when using user-defined functions in LINQ.
- Fixed a bug for globally replicated accounts where Upsert calls were being directed to read locations instead of write locations.
- Added methods to the IDocumentClient interface that were missing:
- UpsertAttachmentAsync method that takes mediaStream and options as parameters
- CreateAttachmentAsync method that takes options as a parameter
- CreateOfferQuery method that takes querySpec as a parameter.
- Unsealed public classes that are exposed in the IDocumentClient interface.
- Added the support for multi-region database accounts.
- Added support for retry on throttled requests. User can customize the number of retries and the max wait time by configuring the ConnectionPolicy.RetryOptions property.
- Added a new IDocumentClient interface that defines the signatures of all DocumenClient properties and methods. As part of this change, also changed extension methods that create IQueryable and IOrderedQueryable to methods on the DocumentClient class itself.
- Added configuration option to set the ServicePoint.ConnectionLimit for a given DocumentDB endpoint Uri. Use ConnectionPolicy.MaxConnectionLimit to change the default value, which is set to 50.
- Deprecated IPartitionResolver and its implementation. Support for IPartitionResolver is now obsolete. It's recommended that you use Partitioned Collections for higher storage and throughput.
- Added an overload to Uri based ExecuteStoredProcedureAsync method that takes RequestOptions as a parameter.
- Added time to live (TTL) support for documents.
- Fixed a bug in Nuget packaging of .NET SDK for packaging it as part of an Azure Cloud Service solution.
- [Fixed] Querying DocumentDB endpoint throws: 'System.Net.Http.HttpRequestException: Error while copying content to a stream'.
- Expanded LINQ support including new operators for paging, conditional expressions and range comparison.
- Take operator to enable SELECT TOP behavior in LINQ
- CompareTo operator to enable string range comparisons
- Conditional (?) and coalesce operators (??)
- [Fixed] ArgumentOutOfRangeException when combining Model projection with Where-In in linq query. #81
- [Fixed] If Select is not the last expression the LINQ Provider assumed no projection and produced SELECT * incorrectly. #58
- Implemented Upsert, Added UpsertXXXAsync methods
- Performance improvements for all requests
- LINQ Provider support for conditional, coalesce and CompareTo methods for strings
- [Fixed] LINQ provider --> Implement Contains method on List to generate the same SQL as on IEnumerable and Array
- [Fixed] BackoffRetryUtility uses the same HttpRequestMessage again instead of creating a new one on retry
- [Obsolete] UriFactory.CreateCollection --> should now use UriFactory.CreateDocumentCollection
- [Fixed] Localization issues when using non en culture info such as nl-NL etc.
- ID Based Routing
- New UriFactory helper to assist with constructing ID based resource links
- New overloads on DocumentClient to take in URI
- Added IsValid() and IsValidDetailed() in LINQ for geospatial
- LINQ Provider support enhanced
- Math - Abs, Acos, Asin, Atan, Ceiling, Cos, Exp, Floor, Log, Log10, Pow, Round, Sign, Sin, Sqrt, Tan, Truncate
- String - Concat, Contains, EndsWith, IndexOf, Count, ToLower, TrimStart, Replace, Reverse, TrimEnd, StartsWith, SubString, ToUpper
- Array - Concat, Contains, Count
- IN operator
- Added support for modifying indexing policies
- New ReplaceDocumentCollectionAsync method in DocumentClient
- New IndexTransformationProgress property in ResourceResponse
for tracking percent progress of index policy changes
- DocumentCollection.IndexingPolicy is now mutable
- Added support for spatial indexing and query
- New Microsoft.Azure.Documents.Spatial namespace for serializing/deserializing spatial types like Point and Polygon
- New SpatialIndex class for indexing GeoJSON data stored in DocumentDB
- [Fixed] : Incorrect SQL query generated from linq expression #38
- Dependency on Newtonsoft.Json v5.0.7
Changes to support Order By
- LINQ provider support for OrderBy() or OrderByDescending()
IndexingPolicy to support Order By
NB: Possible breaking change
If you have existing code that provisions collections with a custom indexing policy, then your existing code will need to be updated to support the new IndexingPolicy class. If you have no custom indexing policy, then this change does not affect you.
- Support for partitioning data by using the new HashPartitionResolver and RangePartitionResolver classes and the IPartitionResolver
- DataContract serialization
- Guid support in LINQ provider
- UDF support in LINQ
- GA SDK
Release & Retirement dates
Microsoft will provide notification at least 12 months in advance of retiring an SDK in order to smooth the transition to a newer/supported version.
New features and functionality and optimizations are only added to the current SDK, as such it is recommended that you always upgrade to the latest SDK version as early as possible.
Any request to DocumentDB using a retired SDK will be rejected by the service.
|Version||Release Date||Retirement Date|
|1.12.0||February 15, 2017||---|
|1.11.4||February 06, 2017||---|
|1.11.3||January 26, 2017||---|
|1.11.1||December 21, 2016||---|
|1.11.0||December 08, 2016||---|
|1.10.0||September 27, 2016||---|
|1.9.5||September 01, 2016||---|
|1.9.4||August 24, 2016||---|
|1.9.3||August 15, 2016||---|
|1.9.2||July 23, 2016||---|
|1.8.0||June 14, 2016||---|
|1.7.1||May 06, 2016||---|
|1.7.0||April 26, 2016||---|
|1.6.3||April 08, 2016||---|
|1.6.2||March 29, 2016||---|
|1.5.3||February 19, 2016||---|
|1.5.2||December 14, 2015||---|
|1.5.1||November 23, 2015||---|
|1.5.0||October 05, 2015||---|
|1.4.1||August 25, 2015||---|
|1.4.0||August 13, 2015||---|
|1.3.0||August 05, 2015||---|
|1.2.0||July 06, 2015||---|
|1.1.0||April 30, 2015||---|
|1.0.0||April 08, 2015||---|
1. How will customers be notified of the retiring SDK?
Microsoft will provide 12 month advance notification to the end of support of the retiring SDK in order to facilitate a smooth transition to a supported SDK. Further, customers will be notified through various communication channels – Azure Management Portal, Developer Center, blog post, and direct communication to assigned service administrators.
2. Can customers author applications using a "to-be" retired DocumentDB SDK during the 12 month period?
Yes, customers will have full access to author, deploy and modify applications using the "to-be" retired DocumentDB SDK during the 12 month grace period. During the 12 month grace period, customers are advised to migrate to a newer supported version of DocumentDB SDK as appropriate.
3. Can customers author and modify applications using a retired DocumentDB SDK after the 12 month notification period?
After the 12 month notification period, the SDK will be retired. Any access to DocumentDB by an applications using a retired SDK will not be permitted by the DocumentDB platform. Further, Microsoft will not provide customer support on the retired SDK.
4. What happens to Customer’s running applications that are using unsupported DocumentDB SDK version?
Any attempts made to connect to the DocumentDB service with a retired SDK version will be rejected.
5. Will new features and functionality be applied to all non-retired SDKs
New features and functionality will only be added to new versions. If you are using an old, non-retired, version of the SDK your requests to DocumentDB will still function as previous but you will not have access to any new capabilities.
6. What should I do if I cannot update my application before a cut-off date
We recommend that you upgrade to the latest SDK as early as possible. Once an SDK has been tagged for retirement you will have 12 months to update your application. If, for whatever reason, you cannot complete your application update within this timeframe then please contact the DocumentDB Team and request their assistance before the cutoff date.
To learn more about DocumentDB, see Microsoft Azure DocumentDB service page.