You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/create-mongodb-xamarin.md
+19-4Lines changed: 19 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.service: cosmos-db
6
6
ms.subservice: cosmosdb-mongo
7
7
ms.devlang: dotnet
8
8
ms.topic: quickstart
9
-
ms.date: 06/20/2018
9
+
ms.date: 03/16/2020
10
10
ms.author: masoucou
11
11
12
12
---
@@ -22,7 +22,7 @@ ms.author: masoucou
22
22
> *[Golang](create-mongodb-golang.md)
23
23
>
24
24
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.
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.
26
26
27
27
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/).
28
28
@@ -48,12 +48,20 @@ The sample described in this article is compatible with MongoDB.Driver version 2
48
48
49
49
First, download the sample app from GitHub. It implements a todo app with MongoDB's document storage model.
50
50
51
-
1. Open a command prompt, create a new folder named git-samples, then close the command prompt.
52
51
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
54
58
md "C:\git-samples"
55
59
```
56
60
61
+
```bash
62
+
mkdir '$home\git-samples\
63
+
```
64
+
57
65
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.
58
66
59
67
```bash
@@ -83,6 +91,8 @@ The following snippets are all taken from the `MongoService` class, found at the
83
91
settings.SslSettings =
84
92
new SslSettings() { EnabledSslProtocols = SslProtocols.Tls12 };
85
93
94
+
settings.RetryWrites = false;
95
+
86
96
MongoClient mongoClient = new MongoClient(settings);
87
97
```
88
98
@@ -156,6 +166,11 @@ Now go back to the Azure portal to get your connection string information and co
156
166
157
167
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.
158
168
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
+
159
174
You've now updated your app with all the info it needs to communicate with Azure Cosmos DB.
0 commit comments