YAMCqrs.BackgroundWorker.Storage.MongoDb 10.0.2

dotnet add package YAMCqrs.BackgroundWorker.Storage.MongoDb --version 10.0.2
                    
NuGet\Install-Package YAMCqrs.BackgroundWorker.Storage.MongoDb -Version 10.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YAMCqrs.BackgroundWorker.Storage.MongoDb" Version="10.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YAMCqrs.BackgroundWorker.Storage.MongoDb" Version="10.0.2" />
                    
Directory.Packages.props
<PackageReference Include="YAMCqrs.BackgroundWorker.Storage.MongoDb" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add YAMCqrs.BackgroundWorker.Storage.MongoDb --version 10.0.2
                    
#r "nuget: YAMCqrs.BackgroundWorker.Storage.MongoDb, 10.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package YAMCqrs.BackgroundWorker.Storage.MongoDb@10.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=YAMCqrs.BackgroundWorker.Storage.MongoDb&version=10.0.2
                    
Install as a Cake Addin
#tool nuget:?package=YAMCqrs.BackgroundWorker.Storage.MongoDb&version=10.0.2
                    
Install as a Cake Tool

YAMCqrs.BackgroundWorker.Storage.MongoDb

Documentacion en español

This package provides a persistent storage implementation for the YAMCqrs BackgroundWorker project using MongoDB. It allows background task execution history to be stored for auditing purposes and health check calculations.

⚙️ Installation

dotnet add package YAMCqrs.BackgroundWorker.Storage.MondgoDb

🚀 Quick Start

To register MongoDB storage in your dependency container:

builder.Services.AddBackgroundWorker(options =>
{
    // Configuration for the core BackgroundWorker library.
    // For more details, see its corresponding documentation.
})
.UseMongoDb(new BackgroundWorkerMongoConfiguration
{
    ConnectionString = "cs_MongoDb",
    DatabaseName = "TestAppDb",
});

By using "cs_MongoDb" as the ConnectionString, we are telling the library to look up the actual value inside the "ConnectionStrings" section using the MongoDb key, as defined in ADR 13

⚙️ Configuration

  • ConnectionString: Connection string used to connect to MongoDB.
  • DatabaseName: Name of the database to use.

🛠️ Implementation Details

  • Indexes: Automatically created.
  • Collections: The MongoDB instance must allow automatic collection creation.

📋 Dependencies

  • MongoDB.Driver
  • YAMCqrs.BackgroundWorker project

💡 Example DB Document

Events are persisted in the WorkerExecutions collection with the following structure:

{
  "_id": "019e3215-a171-7ff2-880a-14597e93cde0",
  "WorkerName": "YAMCqrs.BackgroundWorker.Implementation.CleanBackGroundWorker",
  "ExecutionStartTime": {
    "$date": "2026-05-16T18:38:58.929Z"
  },
  "ExecutionEndTime": {
    "$date": "2026-05-16T18:38:59.163Z"
  },
  "Status": "Success",
  "Success": 1,
  "Failed": 0,
  "Message": ""
}
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.2 0 5/20/2026
10.0.1 86 5/18/2026
10.0.0 85 5/17/2026