File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
source/includes/fundamentals/code-examples Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1
1
using MongoDB . Driver ;
2
- using static System . Console ;
3
2
using MongoDB . Bson ;
4
3
5
4
namespace TestRun . Fundamentals ;
@@ -18,10 +17,10 @@ public static void Main(string[] args)
18
17
var projection = Builders < Flower > . Projection . Include ( "Name" ) . Include ( "Price" ) . Exclude ( "Id" ) ;
19
18
var sort = Builders < Flower > . Sort . Ascending ( "Price" ) . Descending ( "Category" ) ;
20
19
21
- WriteLine ( "Finding documents..." ) ;
20
+ Console . WriteLine ( "Finding documents..." ) ;
22
21
var result = _flowerCollection . Find ( filter ) . Sort ( sort ) . Project ( projection ) . toList ( ) ;
23
22
24
- WriteLine ( result . ToJson ( ) ) ;
23
+ Console . WriteLine ( result . ToJson ( ) ) ;
25
24
26
25
var update = Builders < Flower > . Update . Mul ( "Price" , 0.9 ) ;
27
26
var result2 = _flowerCollection . UpdateOne ( filter , update ) ;
You can’t perform that action at this time.
0 commit comments