Skip to content

Commit 00b9515

Browse files
mongoKartChris Cho
andauthored
DOCSP-27770 - Remove Placeholders (#74)
* first draft * JS feedback * Apply suggestions from code review * CC feedback Co-authored-by: Chris Cho <[email protected]>
1 parent 97d06cb commit 00b9515

File tree

5 files changed

+51
-67
lines changed

5 files changed

+51
-67
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
.. _csharp-network-compression:
1+
.. _csharp-network-compression:
2+
3+
===================
4+
Network Compression
5+
===================

source/includes/quick-start/atlas-setup.rst

Lines changed: 0 additions & 46 deletions
This file was deleted.

source/includes/quick-start/next-steps.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

source/index.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ Take the Free Online Course Taught by MongoDB
6666

6767
.. list-table::
6868

69-
* - .. cssclass:: bordered-figure
70-
.. figure:: /includes/figures/M220N.png
69+
* - .. figure:: /includes/figures/M220N.png
7170
:alt: Banner for the C# MongoDB University Course
7271

7372
- `Using MongoDB with C# <https://learn.mongodb.com/learning-paths/using-mongodb-with-csharp>`__

source/quick-start.txt

Lines changed: 45 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,40 @@ Quick Start
1414

1515
.. include:: /includes/quick-start/overview.rst
1616

17+
Create a MongoDB Cluster
18+
------------------------
19+
20+
Set Up a Free Tier Cluster in Atlas
21+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22+
23+
To set up your Atlas Free Tier Cluster required for this guide, complete the guide on
24+
:guides:`MongoDB Atlas Setup </atlas/account>`.
25+
26+
After completing the steps in the Atlas guide, you have a new MongoDB
27+
cluster deployed in Atlas, a new database user, and
28+
:atlas:`sample datasets loaded </sample-data/>` into your cluster. You also have
29+
a connection string similar to the following in your copy buffer:
30+
31+
.. code-block:: bash
32+
33+
"mongodb+srv://<username>:<password>@cluster0.abc.mongodb.net/?retryWrites=true&w=majority"
34+
35+
Set Your Connection String
36+
~~~~~~~~~~~~~~~~~~~~~~~~~~
37+
38+
Run the following code at the command prompt to save your MongoDB connection string to an
39+
environment variable. This method is safer than including your credentials in your source
40+
code.
41+
42+
.. code-block:: bash
43+
44+
export MONGODB_URI='<your MongoDB connection string>'
45+
46+
.. important::
47+
48+
Make sure to replace the ``<username>`` and ``<password>`` sections of the connection
49+
string with the username and password of your Atlas user.
50+
1751
Set Up Your Project
1852
-------------------
1953

@@ -39,32 +73,21 @@ Use the ``dotnet add`` command to add the {+driver-short+} to your project as a
3973

4074
dotnet add package MongoDB.Driver
4175

42-
Create a MongoDB Cluster
43-
------------------------
44-
45-
.. include:: /includes/quick-start/atlas-setup.rst
46-
4776
Query Your MongoDB Cluster from Your Application
4877
------------------------------------------------
4978

50-
First, save your Atlas connection string to an environment variable named ``MONGODB_URI``. This prevents potential security issues caused by including your credentials in the source code.
79+
In this step, you'll use the {+driver-short+}
80+
to connect to your MongoDB cluster and run a query on the sample data.
5181

52-
.. code-block:: bash
53-
54-
export MONGODB_URI='<your atlas connection string>'
55-
56-
.. important::
57-
58-
Make sure to replace the "<username>" and "<password>" sections of the connection string with the username and password of your Atlas user.
59-
60-
Next, open the file named ``Program.cs`` in the base directory of your project. Copy the
82+
Open the file named ``Program.cs`` in the base directory of your project. Copy the
6183
following sample code into ``Program.cs``
6284

6385
.. literalinclude:: /includes/quick-start/Program.cs
6486
:language: csharp
6587
:dedent:
6688

67-
The sample code runs a query against your sample dataset in MongoDB Atlas. Run the sample code with the following command from your command line:
89+
This sample code runs a query against your sample dataset in MongoDB Atlas. Run it
90+
from your command line by using the following command:
6891

6992
.. code-block:: bash
7093

@@ -81,7 +104,12 @@ After completing this step, you should have a working application that uses
81104
the {+driver-short+} to connect to your MongoDB cluster, run a query on the
82105
sample data, and print out the result.
83106

107+
To learn more about connecting to Atlas with the {+driver-short+}, see
108+
the :atlas:`Atlas driver connection </driver-connection>` guide
109+
and select :guilabel:`{+language+}` from the :guilabel:`Select your language` dropdown.
110+
84111
Next steps
85112
----------
86113

87-
.. include:: /includes/quick-start/next-steps.rst
114+
Learn how to read and modify data using the {+driver-short+} in the CRUD Operations
115+
guide or how to perform common operations in Usage Examples.

0 commit comments

Comments
 (0)