Skip to content

Commit 4b8703a

Browse files
committed
Update What's New for 2.5.0.
1 parent 686bafb commit 4b8703a

File tree

7 files changed

+165
-12
lines changed

7 files changed

+165
-12
lines changed

Docs/landing/data/releases.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ current = "2.5.0"
55
docs = "./2.5/"
66
api = "./2.5/apidocs"
77

8+
[[versions]]
9+
version = "2.4.4"
10+
docs = "./2.4/"
11+
api = "./2.4/apidocs"
12+
813
[[versions]]
914
version = "2.3.0"
1015
docs = "./2.3/"
@@ -35,32 +40,32 @@ current = "2.5.0"
3540
package = "MongoDB.Driver"
3641
description = "The driver."
3742
dependencies = ".NET Core Driver,.NET BSON Library"
38-
versions = "2.5.0,2.3.0,2.2.4,2.1.1,2.0.2"
43+
versions = "2.5.0,2.4.4,2.3.0,2.2.4,2.1.1,2.0.2"
3944

4045
[[drivers]]
4146
name = ".NET GridFS"
4247
package = "MongoDB.Driver.GridFS"
4348
description = "The GridFS library."
4449
dependencies = ".NET Driver,.NET Core Driver,.NET BSON Library"
45-
versions = "2.5.0,2.3.0,2.2.4,2.1.1"
50+
versions = "2.5.0,2.4.4,2.3.0,2.2.4,2.1.1"
4651

4752
[[drivers]]
4853
name = ".NET Core Driver"
4954
package = "MongoDB.Driver.Core"
5055
description = "The core driver."
5156
dependencies = ".NET BSON Library"
52-
versions = "2.5.0,2.3.0,2.2.4,2.1.1,2.0.2"
57+
versions = "2.5.0,2.4.4,2.3.0,2.2.4,2.1.1,2.0.2"
5358

5459
[[drivers]]
5560
name = ".NET BSON Library"
5661
package = "MongoDB.Bson"
5762
description = "The BSON library."
5863
dependencies = ""
59-
versions = "2.5.0,2.3.0,2.2.4,2.1.1,2.0.2"
64+
versions = "2.5.0,2.4.4,2.3.0,2.2.4,2.1.1,2.0.2"
6065

6166
[[drivers]]
6267
name = ".NET Legacy Driver"
6368
package = "mongocsharpdriver"
6469
description = "The legacy driver."
6570
dependencies = ".NET Driver,.NET Core Driver,.NET BSON Library"
66-
versions = "2.5.0,2.3.0,2.2.4,2.1.1,2.0.2,1.11"
71+
versions = "2.5.0,2.4.4,2.3.0,2.2.4,2.1.1,2.0.2,1.11"

Docs/landing/static/versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"version": "2.4"},{"version": "2.3"},{"version": "2.2"},{"version": "2.1"},{"version": "2.0"}, {"version": "1.11"}]
1+
[{"version": "2.5"},{"version": "2.4"},{"version": "2.3"},{"version": "2.2"},{"version": "2.1"},{"version": "2.0"}, {"version": "1.11"}]

Docs/reference/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
baseurl = "/mongo-csharp-driver/2.4"
1+
baseurl = "/mongo-csharp-driver/2.5"
22
languageCode = "en-us"
33
title = "MongoDB .NET Driver"
44
theme = "mongodb"

Docs/reference/content/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ type = "index"
1010
The [Getting Started]({{< relref "getting_started\index.md" >}}) guide contains information about system requirements, installation, and a simple tutorial to get up and running quickly.
1111

1212

13-
## What's new in 2.4
13+
## What's new in 2.5
1414

1515
The [What's New]({{< relref "what_is_new.md" >}}) section contains the major new features of the driver.
1616

17-
The main new feature is support for version 3.4 of the server.
17+
The main new feature is support for version 3.6 of the server.
1818

1919

2020
## Upgrading

Docs/reference/content/upgrading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ title = "Upgrading"
1111

1212
## Breaking Changes
1313

14-
There should be no breaking changes in version 2.4.0 of the driver.
14+
There should be no breaking changes in version 2.5.0 of the driver.

Docs/reference/content/what_is_new.md

Lines changed: 149 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,32 @@ title = "What's New"
88
pre = "<i class='fa fa-star'></i>"
99
+++
1010

11-
## What's new in 2.4.0
11+
## What's New in 2.5.0
12+
13+
The 2.5.0 driver adds support for many of the new features introduced by the 3.6.0 server.
14+
15+
### Change streams
16+
17+
The 2.5.0 driver adds support for [change streams](http://dochub.mongodb.org/core/changestreams).
18+
See the `Watch` and `WatchAsync` methods in [`IMongoCollection`]({{< apiref "T_MongoDB_Driver_IMongoCollection_1" >}}).
19+
20+
### Retryable writes
21+
22+
The 2.5.0 driver adds support for retryable writes using the `RetryWrites` setting in
23+
[`MongoClientSettings`]({{< apiref "T_MongoDB_Driver_MongoClientSettings" >}}).
24+
25+
### Causal consistency
26+
27+
The 2.5.0 driver adds support for [causal consistency](http://dochub.mongodb.org/core/causal-consistency) via the new
28+
[`IClientSession`]({{< apiref "T_MongoDB_Driver_IClientSession" >}}) API. To start a new causally consistent session
29+
set the `CausalConsistency` property to true in [`ClientSessionOptions`]({{< apiref "T_MongoDB_Driver_ClientSessionOptions" >}})
30+
when calling the `StartSession` or `StartSessionAsync` methods in [`IMongoClient`]({{< apiref "T_MongoDB_Driver_IMongoClient" >}}).
31+
32+
### Servers older than 2.6.0 are no longer supported
33+
34+
The 2.5.0 driver only supports versions 2.6.0 and newer of the server. Servers older than 2.6.0 are no longer supported.
35+
36+
## What's New in 2.4.0
1237

1338
The 2.4.0 driver is a minor release that adds support for new features introduced in server 3.4 and fixes bugs reported since 2.3.0 was released.
1439

@@ -129,3 +154,126 @@ continue to hold a number of open connections that are no longer needed.
129154

130155
If you find yourself needing to shut down a connection pool you can use the new UnregisterAndDisposeCluster
131156
method of the ClusterRegistry class.
157+
158+
## What's New in 2.3.0
159+
160+
The 2.3.0 driver is a minor release with few new features. The most notable is discussed below.
161+
162+
### Support for .NET Core
163+
164+
You can now use the .NET driver with .NET Core.
165+
166+
The Nuget packages target two versions of the .NET frameworks: net45 and netstandard1.5. The net45 target allows the driver to be used with the full .NET Framework
167+
version 4.5 and later, and the netstandard1.5 target allows the driver to be used with any framework that supports netstandard1.5, which includes .NET Core 1.0.
168+
169+
## What's New in 2.2.0
170+
171+
The 2.2 driver ships with a number of new features. The most notable are discussed below.
172+
173+
### Sync API
174+
175+
The 2.0 and 2.1 versions of the .NET driver featured a new async-only API. Version 2.2 introduces sync versions of every async method.
176+
177+
### Support for server 3.2
178+
179+
* Support for bypassing document validation for write operations on collections where document validation has been enabled
180+
* Support for write concern for FindAndModify methods
181+
* Support for read concern
182+
* Builder support for new aggregation stages and new accumulators in $group stage
183+
* Support for version 3 text indexes
184+
185+
## What's New in 2.1.0
186+
187+
The 2.1 driver ships with a number of new features. The most notable are discussed below.
188+
189+
### GridFS
190+
191+
[CSHARP-1191](https://jira.mongodb.org/browse/CSHARP-1191) - GridFS support has been implemented.
192+
193+
### LINQ
194+
195+
[CSHARP-935](https://jira.mongodb.org/browse/CSHARP-935) LINQ support has been rewritten and now targets the aggregation framework. It is a more natural translation and enables many features of LINQ that were previously not able to be translated.
196+
197+
Simply use the new [`AsQueryable`]({{< apiref "M_MongoDB_Driver_IMongoCollectionExtensions_AsQueryable__1" >}}) method to work with LINQ.
198+
199+
## What's New in 2.0.0
200+
201+
The 2.0.0 driver ships with a host of new features. The most notable are discussed below.
202+
203+
### Async
204+
205+
As has been requested for a while now, the driver now offers a full async stack. Since it uses Tasks, it is fully usable
206+
with async and await.
207+
208+
While we offer a mostly backwards-compatible sync API, it is calling into the async stack underneath. Until you are ready
209+
to move to async, you should measure against the 1.x versions to ensure performance regressions don't enter your codebase.
210+
211+
All new applications should utilize the New API.
212+
213+
### New API
214+
215+
Because of our async nature, we have rebuilt our entire API. The new API is accessible via MongoClient.GetDatabase.
216+
217+
- Interfaces are used ([`IMongoClient`]({{< apiref "T_MongoDB_Driver_IMongoClient" >}}), [`IMongoDatabase`]({{< apiref "T_MongoDB_Driver_IMongoDatabase" >}}), [`IMongoCollection<TDocument>`]({{< apiref "T_MongoDB_Driver_IMongoCollection_1" >}})) to support easier testing.
218+
- A fluent Find API is available with full support for expression trees including projections.
219+
220+
``` csharp
221+
var names = await db.GetCollection<Person>("people")
222+
.Find(x => x.FirstName == "Jack")
223+
.SortBy(x => x.Age)
224+
.Project(x => x.FirstName + " " + x.LastName)
225+
.ToListAsync();
226+
```
227+
228+
- A fluent Aggregation API is available with mostly-full support for expression trees.
229+
230+
``` csharp
231+
var totalAgeByLastName = await db.GetCollection<Person>("people")
232+
.Aggregate()
233+
.Match(x => x.FirstName == "Jack")
234+
.GroupBy(x => x.LastName, g => new { _id = g.Key, TotalAge = g.Sum(x => x.Age)})
235+
.ToListAsync();
236+
```
237+
238+
- Support for dynamic.
239+
240+
``` csharp
241+
var person = new ExpandoObject();
242+
person.FirstName = "Jane";
243+
person.Age = 12;
244+
person.PetNames = new List<dynamic> { "Sherlock", "Watson" }
245+
await db.GetCollection<dynamic>("people").InsertOneAsync(person);
246+
```
247+
248+
### Experimental Features
249+
250+
We've also include some experimental features which are subject to change. These are both based on the Listener API.
251+
252+
#### Logging
253+
254+
It is possible to see what is going on deep down in the driver by listening to core events. We've included a simple text logger as an example:
255+
256+
``` csharp
257+
var settings = new MongoClientSettings
258+
{
259+
ClusterConfigurator = cb =>
260+
{
261+
var textWriter = TextWriter.Synchronized(new StreamWriter("mylogfile.txt"));
262+
cb.AddListener(new LogListener(textWriter));
263+
}
264+
};
265+
```
266+
267+
#### Performance Counters
268+
269+
Windows Performance Counters can be enabled to track statistics like average message size, number of connections in the pool, etc...
270+
271+
``` csharp
272+
var settings = new MongoClientSettings
273+
{
274+
ClusterConfigurator = cb =>
275+
{
276+
cb.UsePeformanceCounters("MyApplicationName");
277+
}
278+
};
279+
```

Docs/reference/data/mongodb.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
githubRepo = "mongo-csharp-driver"
22
githubBranch = "master"
3-
currentVersion = "2.4"
3+
currentVersion = "2.5"
44
highlightTheme = "idea.css"
55
apiUrl = "apidocs/html"

0 commit comments

Comments
 (0)