![]() |
VOOZH | about |
dotnet add package Eventuous.Projections.MongoDB --version 0.16.4
NuGet\Install-Package Eventuous.Projections.MongoDB -Version 0.16.4
<PackageReference Include="Eventuous.Projections.MongoDB" Version="0.16.4" />
<PackageVersion Include="Eventuous.Projections.MongoDB" Version="0.16.4" />Directory.Packages.props
<PackageReference Include="Eventuous.Projections.MongoDB" />Project file
paket add Eventuous.Projections.MongoDB --version 0.16.4
#r "nuget: Eventuous.Projections.MongoDB, 0.16.4"
#:package Eventuous.Projections.MongoDB@0.16.4
#addin nuget:?package=Eventuous.Projections.MongoDB&version=0.16.4Install as a Cake Addin
#tool nuget:?package=Eventuous.Projections.MongoDB&version=0.16.4Install as a Cake Tool
This package adds MongoDB projections to applications built with Eventuous.
There are two main components provided by this package:
MongoCheckpointStore, implements ICheckpointStoreMongoProjection, implements IEventHandlerYou 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.
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. |
Showing the top 1 NuGet packages that depend on Eventuous.Projections.MongoDB:
| Package | Downloads |
|---|---|
|
Eventuous.Connector.EsdbMongo
Eventuous connector between EventStoreDB and other things |
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 |