1
1
C# Driver Version 1.4.1 Release Notes
2
2
===================================
3
3
4
- The minor release fixes a few issues found by users in the LINQ support added
4
+ This minor release fixes a few issues found by users of the LINQ support added
5
5
in v1.4 of the C# driver and also adds support for a few new LINQ query
6
6
operators and where clauses.
7
7
@@ -74,7 +74,7 @@ MaxSerializationDepth
74
74
The BSON serialization mechanism does not support circular references in your
75
75
object graph. In earlier versions of the C# driver if you attempted to
76
76
serialize an object with circular references you would get a
77
- StackOverflowExpection. The 1.4.1 release now tracks the serialization depth
77
+ StackOverflowExpection. The 1.4.1 version now tracks the serialization depth
78
78
as it serializes an object and if it exceeds MaxSerializationDepth a
79
79
BsonSerializationException is thrown. The problem with StackOverflowException
80
80
was that it was fatal to your process, but the BsonSerializationException can
@@ -182,12 +182,12 @@ Additional expressions supported in LINQ where clauses
182
182
183
183
The following expressions are now supported in LINQ where clauses:
184
184
185
- d is the document
186
- p is a property of the document
187
- c is a character constant
188
- ca is an array of character constants
189
- s is a string constant
190
- i, j, k, n are integer constants
185
+ // d is the document
186
+ // p is a property of the document
187
+ // c is a character constant
188
+ // ca is an array of character constants
189
+ // s is a string constant
190
+ // i, j, k, n are integer constants
191
191
192
192
where d.p.Equals(constant)
193
193
where string.IsNullOrEmpty(d.p)
@@ -205,17 +205,28 @@ i, j, k, n are integer constants
205
205
where d.p.ToLower().Contains("xyz")
206
206
where d.p.ToLower().StartsWith("xyz")
207
207
where d.p.ToLower().EndsWith("xyz")
208
+ where d.p.ToUpper().Contains("xyz")
209
+ where d.p.ToUpper().StartsWith("xyz")
210
+ where d.p.ToUpper().EndsWith("xyz")
208
211
where d.p.Trim().Contains("xyz")
209
212
where d.p.Trim().StartsWith("xyz")
210
213
where d.p.Trim().EndsWith("xyz")
211
- // any combination of ToLower/ToUpper/Trim/TrimStart/TrimEnd followed by Contains/StartsWith/EndsWith
214
+ where d.p.TrimStart().Contains("xyz")
215
+ where d.p.TrimStart().StartsWith("xyz")
216
+ where d.p.TrimStart().EndsWith("xyz")
217
+ where d.p.TrimEnd().Contains("xyz")
218
+ where d.p.TrimEnd().StartsWith("xyz")
219
+ where d.p.TrimEnd().EndsWith("xyz")
212
220
where d.GetType() == typeof(T)
213
221
where d is T
214
222
223
+ // you can use any combination of ToLower/ToUpper/Trim/TrimStart/TrimEnd
224
+ // before Contains/StartsWith/EndsWith
225
+
215
226
Type of <T > in AsQueryable can now be deduced
216
227
---------------------------------------------
217
228
218
- The type of < T > in the call to AsQueryable can now be deduced from the collection argument:
229
+ The type of \< T \ > in the call to AsQueryable can now be deduced from the collection argument:
219
230
220
231
var collection = database.GetCollection<MyDocument>("mydocuments")
221
232
var query = collection.AsQueryable(); // <T> is deduced to be MyDocument
0 commit comments