You need to have the SDK Version 1.6.0 or newer to support Document DB Partitioning.
Using the SDK you need to set the OfferThroughput value like shown below.
In this sample we set the /deviceId as the partition key.
DocumentClient client = new DocumentClient(new Uri(endpoint), authKey);
await client.CreateDatabaseAsync(new Database { Id = "db" });
// Collection for device telemetry. Here the JSON property deviceId will be used as the partition key to
// spread across partitions. Configured for 10K RU/s throughput and an indexing policy that supports
// sorting against any number or string property.
DocumentCollection myCollection = new DocumentCollection();
myCollection.Id = "coll";
myCollection.PartitionKey.Paths.Add("/deviceId");
await client.CreateDocumentCollectionAsync(
UriFactory.CreateDatabaseUri("db"),
myCollection,
new RequestOptions { OfferThroughput = 20000 });
Note:
In order to create partitioned collections, you must specify a throughput
value of > 10,000 request units per second. Since throughput is in multiples of 100, this has to be 10,100 or higher.
So when your OfferThroughput is set to less than 20000 then your collection will be Single Partition.