Skip to content

Commit c74e236

Browse files
authored
Merge pull request #107873 from codemillmatt/xam-mongo-qs-fix
updated and fixed xamarin article for latest version of mongo in quickstart
2 parents 835bcd4 + a6a9b6c commit c74e236

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

articles/cosmos-db/create-mongodb-xamarin.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.service: cosmos-db
66
ms.subservice: cosmosdb-mongo
77
ms.devlang: dotnet
88
ms.topic: quickstart
9-
ms.date: 06/20/2018
9+
ms.date: 03/16/2020
1010
ms.author: masoucou
1111

1212
---
@@ -22,7 +22,7 @@ ms.author: masoucou
2222
> * [Golang](create-mongodb-golang.md)
2323
>
2424
25-
Azure Cosmos DB is Microsofts globally distributed multi-model database service. You can quickly create and query document, key/value, and graph databases, all of which benefit from the global distribution and horizontal scale capabilities at the core of Azure Cosmos DB.
25+
Azure Cosmos DB is Microsoft's globally distributed multi-model database service. You can quickly create and query document, key/value, and graph databases, all of which benefit from the global distribution and horizontal scale capabilities at the core of Azure Cosmos DB.
2626

2727
This quickstart demonstrates how to create a [Cosmos account configured with Azure Cosmos DB's API for MongoDB](mongodb-introduction.md), document database, and collection using the Azure portal. You'll then build a todo app Xamarin.Forms app by using the [MongoDB .NET driver](https://docs.mongodb.com/ecosystem/drivers/csharp/).
2828

@@ -48,12 +48,20 @@ The sample described in this article is compatible with MongoDB.Driver version 2
4848

4949
First, download the sample app from GitHub. It implements a todo app with MongoDB's document storage model.
5050

51-
1. Open a command prompt, create a new folder named git-samples, then close the command prompt.
5251

53-
```bash
52+
53+
# [Windows](#tab/windows)
54+
55+
1. On Windows open a command prompt or on Mac open the terminal, create a new folder named git-samples, then close the window.
56+
57+
```batch
5458
md "C:\git-samples"
5559
```
5660
61+
```bash
62+
mkdir '$home\git-samples\
63+
```
64+
5765
2. Open a git terminal window, such as git bash, and use the `cd` command to change to the new folder to install the sample app.
5866
5967
```bash
@@ -83,6 +91,8 @@ The following snippets are all taken from the `MongoService` class, found at the
8391
settings.SslSettings =
8492
new SslSettings() { EnabledSslProtocols = SslProtocols.Tls12 };
8593
94+
settings.RetryWrites = false;
95+
8696
MongoClient mongoClient = new MongoClient(settings);
8797
```
8898
@@ -156,6 +166,11 @@ Now go back to the Azure portal to get your connection string information and co
156166
157167
3. Copy your **primary connection string** value from the portal (using the copy button) and make it the value of the **ConnectionString** field in your **APIKeys.cs** file.
158168
169+
4. Remove `&replicaSet=globaldb` from the connection string. You will get a runtime error if you do not remove that value from the query string.
170+
171+
> [!IMPORTANT]
172+
> You must remove the `&replicaSet=globaldb` key/value pair from the connection string's query string in order to avoid a runtime error.
173+
159174
You've now updated your app with all the info it needs to communicate with Azure Cosmos DB.
160175
161176
## Run the app

0 commit comments

Comments
 (0)