File tree Expand file tree Collapse file tree 18 files changed +738
-18
lines changed
source/includes/code-examples Expand file tree Collapse file tree 18 files changed +738
-18
lines changed Original file line number Diff line number Diff line change @@ -53,4 +53,44 @@ private static void Setup()
53
53
var restaurantsDatabase = mongoClient . GetDatabase ( "sample_restaurants" ) ;
54
54
_restaurantsCollection = restaurantsDatabase . GetCollection < Restaurant > ( "restaurants" ) ;
55
55
}
56
- }
56
+ }
57
+
58
+ public class Restaurant
59
+ {
60
+ public ObjectId Id { get ; set ; }
61
+
62
+ public string Name { get ; set ; }
63
+
64
+ [ BsonElement ( "restaurant_id" ) ]
65
+ public string RestaurantId { get ; set ; }
66
+
67
+ public string Cuisine { get ; set ; }
68
+
69
+ public Address Address { get ; set ; }
70
+
71
+ public string Borough { get ; set ; }
72
+
73
+ public List < GradeEntry > Grades { get ; set ; }
74
+ }
75
+
76
+ public class Address
77
+ {
78
+ public string Building { get ; set ; }
79
+
80
+ [ BsonElement ( "coord" ) ]
81
+ public double [ ] Coordinates { get ; set ; }
82
+
83
+ public string Street { get ; set ; }
84
+
85
+ [ BsonElement ( "zipcode" ) ]
86
+ public string ZipCode { get ; set ; }
87
+ }
88
+
89
+ public class GradeEntry
90
+ {
91
+ public DateTime Date { get ; set ; }
92
+
93
+ public string Grade { get ; set ; }
94
+
95
+ public float Score { get ; set ; }
96
+ }
Original file line number Diff line number Diff line change @@ -55,4 +55,44 @@ private static void Setup()
55
55
var restaurantsDatabase = mongoClient . GetDatabase ( "sample_restaurants" ) ;
56
56
_restaurantsCollection = restaurantsDatabase . GetCollection < Restaurant > ( "restaurants" ) ;
57
57
}
58
- }
58
+ }
59
+
60
+ public class Restaurant
61
+ {
62
+ public ObjectId Id { get ; set ; }
63
+
64
+ public string Name { get ; set ; }
65
+
66
+ [ BsonElement ( "restaurant_id" ) ]
67
+ public string RestaurantId { get ; set ; }
68
+
69
+ public string Cuisine { get ; set ; }
70
+
71
+ public Address Address { get ; set ; }
72
+
73
+ public string Borough { get ; set ; }
74
+
75
+ public List < GradeEntry > Grades { get ; set ; }
76
+ }
77
+
78
+ public class Address
79
+ {
80
+ public string Building { get ; set ; }
81
+
82
+ [ BsonElement ( "coord" ) ]
83
+ public double [ ] Coordinates { get ; set ; }
84
+
85
+ public string Street { get ; set ; }
86
+
87
+ [ BsonElement ( "zipcode" ) ]
88
+ public string ZipCode { get ; set ; }
89
+ }
90
+
91
+ public class GradeEntry
92
+ {
93
+ public DateTime Date { get ; set ; }
94
+
95
+ public string Grade { get ; set ; }
96
+
97
+ public float Score { get ; set ; }
98
+ }
Original file line number Diff line number Diff line change @@ -52,4 +52,44 @@ private static void Setup()
52
52
var restaurantsDatabase = mongoClient . GetDatabase ( "sample_restaurants" ) ;
53
53
_restaurantsCollection = restaurantsDatabase . GetCollection < Restaurant > ( "restaurants" ) ;
54
54
}
55
- }
55
+ }
56
+
57
+ public class Restaurant
58
+ {
59
+ public ObjectId Id { get ; set ; }
60
+
61
+ public string Name { get ; set ; }
62
+
63
+ [ BsonElement ( "restaurant_id" ) ]
64
+ public string RestaurantId { get ; set ; }
65
+
66
+ public string Cuisine { get ; set ; }
67
+
68
+ public Address Address { get ; set ; }
69
+
70
+ public string Borough { get ; set ; }
71
+
72
+ public List < GradeEntry > Grades { get ; set ; }
73
+ }
74
+
75
+ public class Address
76
+ {
77
+ public string Building { get ; set ; }
78
+
79
+ [ BsonElement ( "coord" ) ]
80
+ public double [ ] Coordinates { get ; set ; }
81
+
82
+ public string Street { get ; set ; }
83
+
84
+ [ BsonElement ( "zipcode" ) ]
85
+ public string ZipCode { get ; set ; }
86
+ }
87
+
88
+ public class GradeEntry
89
+ {
90
+ public DateTime Date { get ; set ; }
91
+
92
+ public string Grade { get ; set ; }
93
+
94
+ public float Score { get ; set ; }
95
+ }
Original file line number Diff line number Diff line change @@ -52,4 +52,44 @@ private static void Setup()
52
52
var restaurantsDatabase = mongoClient . GetDatabase ( "sample_restaurants" ) ;
53
53
_restaurantsCollection = restaurantsDatabase . GetCollection < Restaurant > ( "restaurants" ) ;
54
54
}
55
- }
55
+ }
56
+
57
+ public class Restaurant
58
+ {
59
+ public ObjectId Id { get ; set ; }
60
+
61
+ public string Name { get ; set ; }
62
+
63
+ [ BsonElement ( "restaurant_id" ) ]
64
+ public string RestaurantId { get ; set ; }
65
+
66
+ public string Cuisine { get ; set ; }
67
+
68
+ public Address Address { get ; set ; }
69
+
70
+ public string Borough { get ; set ; }
71
+
72
+ public List < GradeEntry > Grades { get ; set ; }
73
+ }
74
+
75
+ public class Address
76
+ {
77
+ public string Building { get ; set ; }
78
+
79
+ [ BsonElement ( "coord" ) ]
80
+ public double [ ] Coordinates { get ; set ; }
81
+
82
+ public string Street { get ; set ; }
83
+
84
+ [ BsonElement ( "zipcode" ) ]
85
+ public string ZipCode { get ; set ; }
86
+ }
87
+
88
+ public class GradeEntry
89
+ {
90
+ public DateTime Date { get ; set ; }
91
+
92
+ public string Grade { get ; set ; }
93
+
94
+ public float Score { get ; set ; }
95
+ }
Original file line number Diff line number Diff line change @@ -72,4 +72,44 @@ private static void Setup()
72
72
var restaurantsDatabase = mongoClient . GetDatabase ( "sample_restaurants" ) ;
73
73
_restaurantsCollection = restaurantsDatabase . GetCollection < Restaurant > ( "restaurants" ) ;
74
74
}
75
- }
75
+ }
76
+
77
+ public class Restaurant
78
+ {
79
+ public ObjectId Id { get ; set ; }
80
+
81
+ public string Name { get ; set ; }
82
+
83
+ [ BsonElement ( "restaurant_id" ) ]
84
+ public string RestaurantId { get ; set ; }
85
+
86
+ public string Cuisine { get ; set ; }
87
+
88
+ public Address Address { get ; set ; }
89
+
90
+ public string Borough { get ; set ; }
91
+
92
+ public List < GradeEntry > Grades { get ; set ; }
93
+ }
94
+
95
+ public class Address
96
+ {
97
+ public string Building { get ; set ; }
98
+
99
+ [ BsonElement ( "coord" ) ]
100
+ public double [ ] Coordinates { get ; set ; }
101
+
102
+ public string Street { get ; set ; }
103
+
104
+ [ BsonElement ( "zipcode" ) ]
105
+ public string ZipCode { get ; set ; }
106
+ }
107
+
108
+ public class GradeEntry
109
+ {
110
+ public DateTime Date { get ; set ; }
111
+
112
+ public string Grade { get ; set ; }
113
+
114
+ public float Score { get ; set ; }
115
+ }
Original file line number Diff line number Diff line change @@ -73,4 +73,44 @@ private static void Setup()
73
73
var restaurantsDatabase = mongoClient . GetDatabase ( "sample_restaurants" ) ;
74
74
_restaurantsCollection = restaurantsDatabase . GetCollection < Restaurant > ( "restaurants" ) ;
75
75
}
76
- }
76
+ }
77
+
78
+ public class Restaurant
79
+ {
80
+ public ObjectId Id { get ; set ; }
81
+
82
+ public string Name { get ; set ; }
83
+
84
+ [ BsonElement ( "restaurant_id" ) ]
85
+ public string RestaurantId { get ; set ; }
86
+
87
+ public string Cuisine { get ; set ; }
88
+
89
+ public Address Address { get ; set ; }
90
+
91
+ public string Borough { get ; set ; }
92
+
93
+ public List < GradeEntry > Grades { get ; set ; }
94
+ }
95
+
96
+ public class Address
97
+ {
98
+ public string Building { get ; set ; }
99
+
100
+ [ BsonElement ( "coord" ) ]
101
+ public double [ ] Coordinates { get ; set ; }
102
+
103
+ public string Street { get ; set ; }
104
+
105
+ [ BsonElement ( "zipcode" ) ]
106
+ public string ZipCode { get ; set ; }
107
+ }
108
+
109
+ public class GradeEntry
110
+ {
111
+ public DateTime Date { get ; set ; }
112
+
113
+ public string Grade { get ; set ; }
114
+
115
+ public float Score { get ; set ; }
116
+ }
Original file line number Diff line number Diff line change @@ -58,4 +58,44 @@ private static void Setup()
58
58
var restaurantsDatabase = mongoClient . GetDatabase ( "sample_restaurants" ) ;
59
59
_restaurantsCollection = restaurantsDatabase . GetCollection < Restaurant > ( "restaurants" ) ;
60
60
}
61
- }
61
+ }
62
+
63
+ public class Restaurant
64
+ {
65
+ public ObjectId Id { get ; set ; }
66
+
67
+ public string Name { get ; set ; }
68
+
69
+ [ BsonElement ( "restaurant_id" ) ]
70
+ public string RestaurantId { get ; set ; }
71
+
72
+ public string Cuisine { get ; set ; }
73
+
74
+ public Address Address { get ; set ; }
75
+
76
+ public string Borough { get ; set ; }
77
+
78
+ public List < GradeEntry > Grades { get ; set ; }
79
+ }
80
+
81
+ public class Address
82
+ {
83
+ public string Building { get ; set ; }
84
+
85
+ [ BsonElement ( "coord" ) ]
86
+ public double [ ] Coordinates { get ; set ; }
87
+
88
+ public string Street { get ; set ; }
89
+
90
+ [ BsonElement ( "zipcode" ) ]
91
+ public string ZipCode { get ; set ; }
92
+ }
93
+
94
+ public class GradeEntry
95
+ {
96
+ public DateTime Date { get ; set ; }
97
+
98
+ public string Grade { get ; set ; }
99
+
100
+ public float Score { get ; set ; }
101
+ }
Original file line number Diff line number Diff line change @@ -57,4 +57,44 @@ private static void Setup()
57
57
var restaurantsDatabase = mongoClient . GetDatabase ( "sample_restaurants" ) ;
58
58
_restaurantsCollection = restaurantsDatabase . GetCollection < Restaurant > ( "restaurants" ) ;
59
59
}
60
- }
60
+ }
61
+
62
+ public class Restaurant
63
+ {
64
+ public ObjectId Id { get ; set ; }
65
+
66
+ public string Name { get ; set ; }
67
+
68
+ [ BsonElement ( "restaurant_id" ) ]
69
+ public string RestaurantId { get ; set ; }
70
+
71
+ public string Cuisine { get ; set ; }
72
+
73
+ public Address Address { get ; set ; }
74
+
75
+ public string Borough { get ; set ; }
76
+
77
+ public List < GradeEntry > Grades { get ; set ; }
78
+ }
79
+
80
+ public class Address
81
+ {
82
+ public string Building { get ; set ; }
83
+
84
+ [ BsonElement ( "coord" ) ]
85
+ public double [ ] Coordinates { get ; set ; }
86
+
87
+ public string Street { get ; set ; }
88
+
89
+ [ BsonElement ( "zipcode" ) ]
90
+ public string ZipCode { get ; set ; }
91
+ }
92
+
93
+ public class GradeEntry
94
+ {
95
+ public DateTime Date { get ; set ; }
96
+
97
+ public string Grade { get ; set ; }
98
+
99
+ public float Score { get ; set ; }
100
+ }
You can’t perform that action at this time.
0 commit comments