|
| 1 | +Set up a Free Tier Cluster in Atlas |
| 2 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 3 | + |
| 4 | +After setting up your .NET project dependencies, create a MongoDB cluster |
| 5 | +where you can store and manage your data. Complete the |
| 6 | +:atlas:`Get Started with Atlas </getting-started>` guide to set up a new |
| 7 | +Atlas account and free tier MongoDB cluster, load datasets, and |
| 8 | +interact with the data. |
| 9 | + |
| 10 | +After completing the steps in the Atlas guide, you have a new MongoDB |
| 11 | +cluster deployed in Atlas, a new database user, and |
| 12 | +:atlas:`sample datasets loaded </sample-data/>` into your cluster. |
| 13 | + |
| 14 | +.. _csharp-connect-to-your-cluster: |
| 15 | + |
| 16 | +Connect to Your Cluster |
| 17 | +----------------------- |
| 18 | + |
| 19 | +In this step, you'll create and run an application that uses the {+driver-short+} to connect to your MongoDB cluster and run a query on the sample data. |
| 20 | + |
| 21 | +You pass instructions to the driver on where and how to connect to your |
| 22 | +MongoDB cluster in a string called the *connection string*. This string |
| 23 | +includes information on the hostname or IP address and port of your |
| 24 | +cluster, authentication mechanism, user credentials (when applicable), and |
| 25 | +other connection options. |
| 26 | + |
| 27 | +To retrieve your connection string for the cluster and user you created in |
| 28 | +the previous step, log into your Atlas account and navigate to the |
| 29 | +**Clusters** section, then click the **Connect** button for the cluster that you |
| 30 | +want to connect to, as shown below. |
| 31 | + |
| 32 | +.. figure:: /includes/figures/atlas_connection_select_cluster.png |
| 33 | + :alt: Atlas Connection GUI cluster selection screen |
| 34 | + |
| 35 | +Proceed to the **Connect Your Application** step and select the {+driver-short+}. Then, click the **Copy** button to copy the *connection string* |
| 36 | +to your clipboard as shown below. |
| 37 | + |
| 38 | +.. figure:: /includes/figures/atlas_connection_copy_string.png |
| 39 | + :alt: Atlas Connection GUI connection string screen |
| 40 | + |
| 41 | +Save your Atlas connection string in a safe location that you can access |
| 42 | +for the next step. |
| 43 | + |
| 44 | +To learn more about connecting to the {+driver-short+} through Atlas, see |
| 45 | +the :atlas:`Atlas driver connection guide </driver-connection>` |
| 46 | +and select **C#** from the *Select your language* dropdown. |
0 commit comments