Skip to content

.NET client

The .NET client is the C#/.NET SDK for Chronicle. It gives .NET applications typed access to event stores, event logs, read models, projections, reducers, reactors, constraints, migrations, namespaces, and hosting integration.

Use this section for .NET-specific setup and APIs. The main Chronicle docs explain the event-sourcing concepts once and use language tabs for examples that apply across clients.

Use the .NET client when you are building:

  • a console tool or script that talks directly to Chronicle
  • an ASP.NET Core service that appends events from endpoints or Arc commands
  • a Worker Service that runs projections, reducers, reactors, or background append logic
  • a .NET test project that uses Chronicle’s in-process testing scenarios

Install the .NET packages that match the host style you are building. The templates do this for you, but explicit package references are useful when adding Chronicle to an existing application.

Terminal window
dotnet add package Cratis.Chronicle
dotnet add package Cratis.Chronicle.AspNetCore

When a Chronicle concept applies to every client, keep the prose in the shared Chronicle page and put the C# code in Chronicle/Documentation/client-snippets/**. The site renders it beside Kotlin, Elixir, and TypeScript snippets in synchronized language tabs.