Skip to content

Commit 0ac3bcf

Browse files
DOCSP-32853 Add fundamentals links to quick reference (#19)
1 parent 0777612 commit 0ac3bcf

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

source/fundamentals/configure.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ The following code example shows how to create a POCO that represents a customer
4141
</csharp/current/fundamentals/serialization/poco/>` in the
4242
{+csharp-driver-short+} documentation.
4343

44+
.. _entity-framework-db-context:
45+
4446
Create a DB Context Class
4547
-------------------------
4648

source/fundamentals/query-data.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ Find Entities
4141
Find a single entity by using the ``FirstOrDefault()`` method, or find
4242
multiple entities by using the ``Where()`` method.
4343

44+
45+
.. _entity-framework-find-one:
46+
4447
Find a Single Entity
4548
~~~~~~~~~~~~~~~~~~~~
4649

@@ -58,6 +61,8 @@ the planet name to the console:
5861
:language: csharp
5962
:dedent:
6063

64+
.. _entity-framework-find-multiple:
65+
6166
Find Multiple Entities
6267
~~~~~~~~~~~~~~~~~~~~~~
6368

@@ -74,6 +79,8 @@ The following code uses the ``Where()`` method to find all planets that have the
7479
:language: csharp
7580
:dedent:
7681

82+
.. _entity-framework-sort:
83+
7784
Sort Entities
7885
-------------
7986

source/fundamentals/write-data.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ Insert
4343
You can use the ``Add()`` method to insert a single entity into your collection,
4444
or you can use the ``AddRange()`` method to insert multiple entities at once.
4545

46+
47+
.. _entity-framework-insert-one:
48+
4649
Insert One Entity
4750
~~~~~~~~~~~~~~~~~
4851

@@ -59,6 +62,9 @@ insert that entity into the MongoDB collection.
5962
:language: csharp
6063
:dedent:
6164

65+
66+
.. _entity-framework-insert-multiple:
67+
6268
Insert Multiple Entities
6369
~~~~~~~~~~~~~~~~~~~~~~~~
6470

@@ -74,6 +80,8 @@ method to insert those entities into the MongoDB collection.
7480
:language: csharp
7581
:dedent:
7682

83+
.. _entity-framework-update:
84+
7785
Update
7886
------
7987

@@ -101,6 +109,8 @@ You can use the ``Remove()`` method to delete a single entity from your
101109
collection, or the ``RemoveRange()`` method to delete multiple entities at
102110
once.
103111

112+
.. _entity-framework-delete-one:
113+
104114
Delete One Entity
105115
~~~~~~~~~~~~~~~~~
106116

@@ -117,6 +127,8 @@ the MongoDB collection.
117127
:language: csharp
118128
:dedent:
119129

130+
.. _entity-framework-delete-multiple:
131+
120132
Delete Multiple Entities
121133
~~~~~~~~~~~~~~~~~~~~~~~~
122134

source/quick-reference.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ their related API documentation.
1717
* - | **Configure a DBContext**
1818
|
1919
| `API Documentation <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext>`__
20+
| :ref:`Fundamentals <entity-framework-configure>`
2021

2122
- .. literalinclude:: /includes/code-examples/quick-reference.cs
2223
:start-after: // start-db-context
@@ -26,6 +27,7 @@ their related API documentation.
2627

2728
* - | **Create an Instance of the DBContext**
2829
|
30+
| :ref:`Fundamentals <entity-framework-db-context>`
2931

3032
- .. literalinclude:: /includes/code-examples/quick-reference.cs
3133
:start-after: // start-create-instance
@@ -36,6 +38,7 @@ their related API documentation.
3638
* - | **Find an Entity**
3739
|
3840
| `API Documentation <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.query.queryablemethods.firstordefaultwithpredicate>`__
41+
| :ref:`Fundamentals <entity-framework-find-one>`
3942

4043
- .. io-code-block::
4144
:copyable: true
@@ -56,6 +59,7 @@ their related API documentation.
5659
* - | **Find Multiple Entities**
5760
|
5861
| `API Documentation <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.query.queryablemethods.where>`__
62+
| :ref:`Fundamentals <entity-framework-find-multiple>`
5963

6064
- .. io-code-block::
6165
:copyable: true
@@ -82,6 +86,7 @@ their related API documentation.
8286
* - | **Insert an Entity**
8387
|
8488
| `API Documentation <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.add>`__
89+
| :ref:`Fundamentals <entity-framework-insert-one>`
8590

8691
- .. literalinclude:: /includes/code-examples/quick-reference.cs
8792
:start-after: // start-insert-one
@@ -92,6 +97,7 @@ their related API documentation.
9297
* - | **Insert Multiple Entities**
9398
|
9499
| `API Documentation <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.addrange>`__
100+
| :ref:`Fundamentals <entity-framework-insert-multiple>`
95101

96102
- .. literalinclude:: /includes/code-examples/quick-reference.cs
97103
:start-after: // start-insert-many
@@ -102,6 +108,7 @@ their related API documentation.
102108
* - | **Update an Entity**
103109
|
104110
| `API Documentation <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.update>`__
111+
| :ref:`Fundamentals <entity-framework-update>`
105112

106113
- .. literalinclude:: /includes/code-examples/quick-reference.cs
107114
:start-after: // start-update-one
@@ -112,6 +119,7 @@ their related API documentation.
112119
* - | **Update Multiple Entities**
113120
|
114121
| `API Documentation <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.updaterange>`__
122+
| :ref:`Fundamentals <entity-framework-update>`
115123

116124
- .. literalinclude:: /includes/code-examples/quick-reference.cs
117125
:start-after: // start-update-many
@@ -122,6 +130,7 @@ their related API documentation.
122130
* - | **Delete an Entity**
123131
|
124132
| `API Documentation <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.remove>`__
133+
| :ref:`Fundamentals <entity-framework-delete-one>`
125134

126135
- .. literalinclude:: /includes/code-examples/quick-reference.cs
127136
:start-after: // start-delete-one
@@ -132,6 +141,7 @@ their related API documentation.
132141
* - | **Delete Multiple Entities**
133142
|
134143
| `API Documentation <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.removerange>`__
144+
| :ref:`Fundamentals <entity-framework-delete-multiple>`
135145

136146
- .. literalinclude:: /includes/code-examples/quick-reference.cs
137147
:start-after: // start-delete-many
@@ -142,6 +152,7 @@ their related API documentation.
142152
* - | **Specify the Order in Which to Retrieve Entities**
143153
|
144154
| `API Documentation <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.query.queryablemethods.orderby>`__
155+
| :ref:`Fundamentals <entity-framework-sort>`
145156

146157
- .. io-code-block::
147158
:copyable: true
@@ -172,6 +183,7 @@ their related API documentation.
172183
* - | **Specify Multiple Orderings to Retrieve Entities**
173184
|
174185
| `API Documentation <https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.query.queryablemethods.thenby>`__
186+
| :ref:`Fundamentals <entity-framework-sort>`
175187

176188
- .. io-code-block::
177189
:copyable: true

0 commit comments

Comments
 (0)