Skip to content

Commit 6b4dfbe

Browse files
committed
RStam tech review
1 parent eb36532 commit 6b4dfbe

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

source/fundamentals/linq.txt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ that contain an array field ``Grades``:
264264

265265
public class Student
266266
{
267+
public ObjectId Id { get; set; }
267268
public string Name { get; set; }
268269
public int[] Grades { get; set; }
269270
}
@@ -275,15 +276,15 @@ rest of the array:
275276
.. code-block:: csharp
276277

277278
var query = queryableCollection
278-
.Select(s => s.Grades.TakeWhile(g => g > 90);
279+
.Select(s => s.Grades.TakeWhile(g => g > 90).ToArray());
279280

280-
The results resemble the following documents:
281+
The results might resemble the following documents:
281282

282283
.. code-block:: json
283284
:copyable: false
284285

285-
{ "name" : "Maura Day", "grades" : [92, 97] }
286-
{ "name" : "Saul Curzon", "grades" : [100, 95, 91] }
286+
[92, 97]
287+
[100, 95, 91]
287288

288289
$sample
289290
~~~~~~~
@@ -354,6 +355,7 @@ that contain an array field ``Grades``:
354355

355356
public class Student
356357
{
358+
public ObjectId Id { get; set; }
357359
public string Name { get; set; }
358360
public int[] Grades { get; set; }
359361
}
@@ -365,15 +367,15 @@ rest of the array:
365367
.. code-block:: csharp
366368

367369
var query = queryableCollection
368-
.Select(s => s.Grades.SkipWhile(g => g < 75);
370+
.Select(s => s.Grades.SkipWhile(g => g < 75).ToArray());
369371

370-
The results resemble the following documents:
372+
The results might resemble the following documents:
371373

372374
.. code-block:: json
373375
:copyable: false
374376

375-
{ "name" : "Maura Day", "grades" : [80, 90, 70, 83] }
376-
{ "name" : "Saul Curzon", "grades" : [79, 100, 85, 73] }
377+
[80, 90, 70, 83]
378+
[79, 100, 85, 73]
377379

378380
$unwind
379381
~~~~~~~

0 commit comments

Comments
 (0)