# DocumentDBVersions

- Kind: `class`
- Package: [Aspire.Hosting.DocumentDB](/reference/api/csharp/aspire.hosting.documentdb.md)
- Version: `0.111.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/azure-databases-aspire/blob/d8d44d4322ce04a98c27e15113a2ecacf12152d8//home/runner/work/azure-databases-aspire/azure-databases-aspire/src/Aspire.Hosting.DocumentDB/DocumentDBVersion.cs)

String constants and lookup helpers for the DocumentDB versions known to this build of the package.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public static class DocumentDBVersions
{
    // ...
}
```

## Remarks

Per-version constants (for example [DocumentDBVersions.V0_109_0](/reference/api/csharp/aspire.hosting.documentdb/documentdbversions/fields.md#v0-109-0)) are stable strings and may safely be exposed as `const`. [DocumentDBVersions.Latest](/reference/api/csharp/aspire.hosting.documentdb/documentdbversions/properties.md#latest) is intentionally a property -- not a `const` -- so consumers re-resolve it after a NuGet upgrade rather than inlining the old value at compile time.

## Properties

- [All](/reference/api/csharp/aspire.hosting.documentdb/documentdbversions/properties.md#all) : `IReadOnlyList<string>` `static` `get` -- All DocumentDB versions known to this build of the package, sorted ascending by numeric semantic version. The order of this list is part of the contract: `All[All.Count - 1]` is always the newest known version.
- [Latest](/reference/api/csharp/aspire.hosting.documentdb/documentdbversions/properties.md#latest) : `string` `static` `get` -- The newest DocumentDB version known to this build of the package. This is the version applied by default when no explicit version is selected via [DocumentDBBuilderExtensions.WithDocumentDBVersion(IResourceBuilder<DocumentDBServerResource>, DocumentDBVersion)](/reference/api/csharp/aspire.hosting.documentdb/documentdbbuilderextensions/methods.md#withdocumentdbversion-iresourcebuilder-documentdbserverresource-documentdbversion).

## Fields

- [V0_109_0](/reference/api/csharp/aspire.hosting.documentdb/documentdbversions/fields.md#v0-109-0) : `string` `static` -- DocumentDB version string `0.109.0`.
- [V0_110_0](/reference/api/csharp/aspire.hosting.documentdb/documentdbversions/fields.md#v0-110-0) : `string` `static` -- DocumentDB version string `0.110.0`.
- [V0_111_0](/reference/api/csharp/aspire.hosting.documentdb/documentdbversions/fields.md#v0-111-0) : `string` `static` -- DocumentDB version string `0.111.0`.
