Skip to content

Commit 34f1d3c

Browse files
committed
Adding tabs
1 parent 8b88bab commit 34f1d3c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

articles/cosmos-db/how-to-define-unique-keys.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ This article presents the different ways to define [unique keys](unique-keys.md)
3434

3535
To create a container with unique keys see, [Create an Azure Cosmos container with unique key and TTL](manage-with-powershell.md#create-container-unique-key-ttl)
3636

37-
## Use the .NET SDK V2
37+
## Use the .NET SDK
38+
39+
# [.NET SDK V2](#tab/dotnetv2)
3840

3941
When creating a new container using the [.NET SDK v2](https://www.nuget.org/packages/Microsoft.Azure.DocumentDB/), a `UniqueKeyPolicy` object can be used to define unique key constraints.
4042

@@ -54,7 +56,7 @@ client.CreateDocumentCollectionAsync(UriFactory.CreateDatabaseUri("database"), n
5456
});
5557
```
5658

57-
## Use the .NET SDK V3
59+
# [.NET SDK V3](#tab/dotnetv3)
5860

5961
When creating a new container using the [.NET SDK v3](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/), use the SDK's fluent API to declare unique keys in a concise and readable way.
6062

@@ -70,6 +72,7 @@ await client.GetDatabase("database").DefineContainer(name: "container", partitio
7072
.Attach()
7173
.CreateIfNotExistsAsync();
7274
```
75+
---
7376

7477
## Use the Java SDK
7578

0 commit comments

Comments
 (0)