Skip to content

5.0.0

Choose a tag to compare

@Carael Carael released this 20 Nov 12:40
· 10 commits to master since this release
1ab6e19

What's Changed

Full Changelog: 4.0.0...5.0.0

Release Note: MongoDB.Extensions with .NET MongoDB Driver 3.0.0

The release .NET MongoDB Driver 3.0.0 introduces a breaking change requiring an explicit Guid Serializer configuration. If you do not specify a Guid Serializer, an exception will occur at runtime.

  • Existing Projects: If you have not previously defined a Guid Serializer, register the c# legacy serializer to maintain backward compatibility with your existing .NET GUIDs:

    IMongoDatabaseBuilder.RegisterSerializer(new GuidSerializer(GuidRepresentation.CSharpLegacy));
  • New Projects: For a more modern and efficient approach, use the standard serializer:

    IMongoDatabaseBuilder.RegisterSerializer(new GuidSerializer(GuidRepresentation.Standard));

In the release .Net MongoDB Driver 3.0.0 the obsolete setting MongoClientSettings.ConnectionMode has been removed.
Therefore remove the following line:

IMongoDatabaseBuilder.ConfigureConnection(setting => setting.ConnectionMode = ConnectionMode.Automatic)