VOOZH about

URL: https://www.nuget.org/packages/Eventuous.Projections.MongoDB/

⇱ NuGet Gallery | Eventuous.Projections.MongoDB 0.16.4




👁 Image
Eventuous.Projections.MongoDB 0.16.4

dotnet add package Eventuous.Projections.MongoDB --version 0.16.4
 
 
NuGet\Install-Package Eventuous.Projections.MongoDB -Version 0.16.4
 
 
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="Eventuous.Projections.MongoDB" Version="0.16.4" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Eventuous.Projections.MongoDB" Version="0.16.4" />
 
Directory.Packages.props
<PackageReference Include="Eventuous.Projections.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 Eventuous.Projections.MongoDB --version 0.16.4
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Eventuous.Projections.MongoDB, 0.16.4"
 
 
#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 Eventuous.Projections.MongoDB@0.16.4
 
 
#: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=Eventuous.Projections.MongoDB&version=0.16.4
 
Install as a Cake Addin
#tool nuget:?package=Eventuous.Projections.MongoDB&version=0.16.4
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Eventuous MongoDB projections

This package adds MongoDB projections to applications built with Eventuous.

There are two main components provided by this package:

  • MongoCheckpointStore, implements ICheckpointStore
  • MongoProjection, implements IEventHandler

Using checkpoint store

You can register MongoCheckpointStore so it will be used by all subscriptions that need to store checkpoints (normally, EventStoreDB catch-up subscriptions).

services.AddSingleton<ICheckpointStore, MongoCheckpointStore>();

It will add a checkpoint collection to your Mongo database. Each subscription will have its own checkpoint document. The document id would be the subscription id. Make sure to use unique subscription ids across different applications if they use the same Mongo database.

Using projections

Create your own projection class that inherits MongoProjection<T> abstract class. Here, T is the document type, which must be a record. Your document type should inherit from ProjectedDocument record.

Use the On<TEvent> function to register event projection handlers:

public class ProjectWithTasksProjection : MongoProjection<ProjectWithTasks> {
 public ProjectWithTasksProjection(
 IMongoDatabase database,
 ILoggerFactory? loggerFactory
 ) : base(database, QuerySubscription.Id, loggerFactory) { 
 On<V1.ProjectRegistered>(
 ctx => ctx.Message.ProjectId, 
 (ctx, update) => update.SetOnInsert(x => x.ProjectName, ctx.Message.Name)
 );
 On<V1.TaskCreated>(
 ctx => ctx.Message.ProjectId,
 (ctx, update) => update.AddToSet(
 x => x.Tasks,
 new ProjectTaskRecord(ctx.Message.TaskId, ctx.Message.Description)
 )
 );
 }
}

Read more in Eventuous documentation.

Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  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 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Eventuous.Projections.MongoDB:

Package Downloads
Eventuous.Connector.EsdbMongo

Eventuous connector between EventStoreDB and other things

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.16.4 230 4/29/2026
0.16.4-alpha.0.34 60 4/29/2026
0.16.3 1,905 3/10/2026
0.16.2 120 3/10/2026
0.16.1 130 3/9/2026
0.16.0 143 3/5/2026
0.15.1 16,722 11/7/2024
0.15.0 3,101 9/10/2024
0.15.0-rc.3 1,017 8/15/2024
0.15.0-rc.2 1,135 7/19/2024
0.15.0-rc.1 1,337 6/27/2024
0.15.0-beta.10 1,457 2/11/2024
0.15.0-beta.8 564 11/18/2023
0.15.0-beta.7 174 11/17/2023
0.15.0-beta.6 2,198 10/4/2023
0.15.0-beta.5 4,175 8/28/2023
0.15.0-beta.4 461 8/22/2023
0.15.0-beta.3 176 8/21/2023
0.15.0-beta.2 178 8/21/2023
0.15.0-beta.1 492 8/21/2023
Loading failed