@@ -36,7 +36,7 @@ Create a MongoDB Cluster
36
36
.. step:: Update the Placeholders
37
37
38
38
Paste the connection string in your copy buffer into a file in your preferred text
39
- editor. Replace the " <username>" and " <password>" placeholders with
39
+ editor. Replace the `` <username>`` and `` <password>`` placeholders with
40
40
your database user's username and password.
41
41
42
42
Save this file to a safe location for use in the next step.
@@ -88,32 +88,45 @@ Set Up Your Project
88
88
Query Your MongoDB Cluster from Your Application
89
89
------------------------------------------------
90
90
91
- In this step, you'll use the {+provider-short+}
92
- to connect to your MongoDB cluster and run a LINQ query on the sample data.
91
+ .. procedure::
92
+ :style: connected
93
+
94
+ .. step:: Create the Code File
95
+
96
+ Open the file named ``Program.cs`` in the base directory of your project. Copy the
97
+ following sample code into ``Program.cs``:
98
+
99
+ .. literalinclude:: /includes/quick-start/Program.cs
100
+ :language: csharp
101
+ :dedent:
93
102
94
- Open the file named ``Program.cs`` in the base directory of your project. Copy the
95
- following sample code into ``Program.cs``:
103
+ .. step:: Run an Atlas Query
96
104
97
- .. literalinclude:: /includes/quick-start/Program.cs
98
- :language: csharp
99
- :dedent:
105
+ Run the following command in your shell. It should print the plot of the movie
106
+ "Back to the Future" from the sample dataset:
100
107
101
- This sample code queries your sample dataset in Atlas. Run it
102
- in your shell by using the following command:
108
+ .. io-code-block::
109
+ :copyable: true
103
110
104
- .. code-block:: bash
111
+ .. input::
112
+ :language: none
113
+
114
+ dotnet run entity-quickstart.csproj
105
115
106
- dotnet run entity-quickstart.csproj
116
+ .. output::
117
+ :language: none
118
+ :visible: false
107
119
108
- .. literalinclude:: /includes/quick-start/query-output.rst
109
- :copyable: false
120
+ A young man is accidentally sent 30 years into the past in a time-traveling
121
+ DeLorean invented by his friend, Dr. Emmett Brown, and must make sure his
122
+ high-school-age parents unite in order to save his own existence.
110
123
111
- .. tip::
124
+ .. tip::
112
125
113
- If your output is empty, ensure you have loaded the
114
- :atlas:`sample datasets </sample-data/>` into your cluster.
126
+ If your output is empty, ensure you have loaded the
127
+ :atlas:`sample datasets </sample-data/>` into your cluster.
115
128
116
- After completing this step , you should have a working {+framework+} application that
129
+ After completing these steps , you should have a working {+framework+} application that
117
130
connects to your MongoDB cluster, runs a query on the
118
131
sample data, and prints out the result.
119
132
0 commit comments