@@ -124,52 +124,4 @@ Update Many
124124 :copyable: true
125125 :dedent:
126126 :start-after: // start-pipeline-async
127- :end-before: // end-pipeline-async
128-
129- .. TODO: integrate into existing page
130-
131- Sample Class
132- ------------
133-
134- The code examples in this guide demonstrate how you can use builders to
135- create types to interact with documents in the sample collection ``plants.flowers``.
136- Documents in this collection are modeled by the following ``Flower`` class:
137-
138- .. literalinclude:: /includes/fundamentals/code-examples/builders.cs
139- :language: csharp
140- :dedent:
141- :start-after: start-model
142- :end-before: end-model
143-
144- Each builder class takes a generic type parameter
145- ``TDocument`` which represents the type of document that you are working
146- with. In this guide, the ``Flower`` class is the document type used in
147- each builder class example.
148-
149- Define an Update
150- ----------------
151-
152- The ``UpdateDefinitionBuilder`` class provides a type-safe interface for
153- building up an update specification. Suppose you want to create an
154- update specification with the following criteria:
155-
156- - Create the new field ``SunRequirement``
157- - Multiply the ``Price`` field value by 0.9
158-
159- Use builders to create the update specification with the typed variant:
160-
161- .. code-block:: csharp
162- :copyable: true
163-
164- var builder = Builders<Flower>.Update;
165- var update = builder.Set(f => f.SunRequirement, "Full sun").Mul(f => f.Price, 0.9);
166-
167- Alternatively, you can use string-based field names to define the update:
168-
169- .. code-block:: csharp
170- :copyable: true
171-
172- var builder = Builders<Flower>.Update;
173- var update = builder.Set("SunRequirement", "Full sun").Mul("Price", 0.9);
174-
175- - `UpdateDefinitionBuilder <{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.UpdateDefinitionBuilder-1.html>`__
127+ :end-before: // end-pipeline-async
0 commit comments