![]() |
VOOZH | about |
dotnet add package Rebus.MongoDb --version 9.0.0
NuGet\Install-Package Rebus.MongoDb -Version 9.0.0
<PackageReference Include="Rebus.MongoDb" Version="9.0.0" />
<PackageVersion Include="Rebus.MongoDb" Version="9.0.0" />Directory.Packages.props
<PackageReference Include="Rebus.MongoDb" />Project file
paket add Rebus.MongoDb --version 9.0.0
#r "nuget: Rebus.MongoDb, 9.0.0"
#:package Rebus.MongoDb@9.0.0
#addin nuget:?package=Rebus.MongoDb&version=9.0.0Install as a Cake Addin
#tool nuget:?package=Rebus.MongoDb&version=9.0.0Install as a Cake Tool
Provides MongoDB persistence implementations for Rebus for
Provides transport MongoDb implementations for Rebus
You must ensure to map GuidRepresentation for classes inheriting from ISagaData as this is required for any Guid
field in MongoDB.Driver from 3.x and beyond.
Remember, if you have existing saga data from prior to MongoDB.Driver 3.x, this will use
GuidRepresentation.CSharpLegacy so you must take care to ensure you map it appropriately.
ISagaDataIf your saga data class inherits from the ISagaData interface, you can either use attributes:
public class MySagaData : ISagaData
{
[BsonGuidRepresentation(GuidRepresentation.Standard)]
public Guid Id { get; set; }
public int Revision { get; set; }
}
Or you can create a BsonClassMap:
BsonClassMap.RegisterClassMap<MySagaData>(map =>
{
map.MapIdMember(obj => obj.Id).SetSerializer(new GuidSerializer(GuidRepresentation.Standard));
map.MapMember(obj => obj.Revision);
});
SagaDataIf you inherit from SagaData, you can just create a BsonClassMap which will be applied to all classes inheriting
from the base class:
BsonClassMap.RegisterClassMap<SagaData>(map =>
{
map.MapIdMember(obj => obj.Id).SetSerializer(new GuidSerializer(GuidRepresentation.Standard));
map.MapMember(obj => obj.Revision);
});
A third option, if you prefer to configure a representation globally is:
BsonSerializer.RegisterSerializer(new GuidSerializer(GuidRepresentation.Standard));
Remember, this will apply it globally for any code using MongoDB.Driver, including your own. So this is only an option
if all your code uses same representation across all collections.
To run unit test please provide a mongo instance to run test and set the connection string ino REBUS_MONGODB environment variable.
To manually create a nuget package specifying manually the version you can use this commandline.
dotnet pack Rebus.MongoDb\Rebus.MongoDb.csproj -o c:\target_directory -c release /p:PackageVersion=6.0.1011 /p:AssemblyVersion=6.0.0 /p:FileVersion=6.0.0 /p:InformationalVersion=6.0.0-__SHA_OF_COMMIT__
//then you need to push
dotnet nuget push .\Rebus.MongoDb.6.0.1011.nupkg -s https://pkgs.dev.azure.com/xxxxx/_packaging/__packageName__/nuget/v3/index.json --api-key az
👁 alternate text is missing from this package README image
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net472 net472 is compatible. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.0 | 115,936 | 12/18/2024 |
| 8.1.0 | 39,957 | 8/21/2024 |
| 8.0.0 | 82,546 | 11/15/2023 |
| 8.0.0-alpha04 | 2,285 | 8/24/2023 |
| 8.0.0-alpha03 | 354 | 6/12/2023 |
| 8.0.0-alpha02 | 327 | 6/6/2023 |
| 8.0.0-alpha01 | 360 | 3/29/2023 |
| 7.0.0-b3 | 72,447 | 8/1/2022 |
| 7.0.0-b2 | 412 | 8/1/2022 |
| 7.0.0-b1 | 3,386 | 9/22/2021 |
| 6.0.5 | 264,814 | 4/22/2020 |
| 6.0.4 | 8,608 | 3/24/2020 |
| 6.0.0 | 8,435 | 2/5/2020 |
| 6.0.0-b3 | 788 | 1/16/2020 |
| 6.0.0-b2 | 950 | 9/8/2019 |
| 5.1.0 | 1,772 | 1/16/2020 |
| 5.1.0-b1 | 780 | 1/15/2020 |