11C# Driver Version 1.4.1 Release Notes
22===================================
33
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
55in v1.4 of the C# driver and also adds support for a few new LINQ query
66operators and where clauses.
77
@@ -74,7 +74,7 @@ MaxSerializationDepth
7474The BSON serialization mechanism does not support circular references in your
7575object graph. In earlier versions of the C# driver if you attempted to
7676serialize 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
7878as it serializes an object and if it exceeds MaxSerializationDepth a
7979BsonSerializationException is thrown. The problem with StackOverflowException
8080was that it was fatal to your process, but the BsonSerializationException can
@@ -182,12 +182,12 @@ Additional expressions supported in LINQ where clauses
182182
183183The following expressions are now supported in LINQ where clauses:
184184
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
191191
192192 where d.p.Equals(constant)
193193 where string.IsNullOrEmpty(d.p)
@@ -205,17 +205,28 @@ i, j, k, n are integer constants
205205 where d.p.ToLower().Contains("xyz")
206206 where d.p.ToLower().StartsWith("xyz")
207207 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")
208211 where d.p.Trim().Contains("xyz")
209212 where d.p.Trim().StartsWith("xyz")
210213 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")
212220 where d.GetType() == typeof(T)
213221 where d is T
214222
223+ // you can use any combination of ToLower/ToUpper/Trim/TrimStart/TrimEnd
224+ // before Contains/StartsWith/EndsWith
225+
215226Type of <T > in AsQueryable can now be deduced
216227---------------------------------------------
217228
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:
219230
220231 var collection = database.GetCollection<MyDocument>("mydocuments")
221232 var query = collection.AsQueryable(); // <T> is deduced to be MyDocument
0 commit comments