Drasi .NET

Embed the Drasi continuous-query engine in your .NET application

Embed Drasi in your .NET app

Drasi runs Drasi's continuous-query engine in-process in .NET. No servers, no brokers, no Kubernetes. Push graph changes from C#, subscribe to result diffs with callbacks or IAsyncEnumerable, or load native Drasi plugins at runtime.

How Drasi works in .NET

Install the NuGet package, create sources, continuous queries, and reactions in code, and handle changes as they happen. A Rust cdylib hosts the embeddable engine behind a C ABI. C# binds it with [LibraryImport] and wraps it in Engine. Prebuilt binaries ship for Windows, Linux, and macOS.

Install
dotnet add package Drasi
Write code
Create sources, queries, and reactions
React to change
Handle result diffs in your app

Push graph changes from your application into a C# source, run a continuous query in Cypher or GQL, and receive the added, updated, and removed rows in a C# reaction. All of that stays inside your process. When you need to connect to real systems, load Drasi’s native source and reaction plugins at runtime, or pull them from the ghcr.io/drasi-project OCI registry.

When to use Drasi in .NET

Drasi fits a .NET application or service that needs precise change detection without a separate cluster:

  • Event-driven services. React to data changes without polling. Each diff includes the before and after state.
  • ASP.NET Core and worker services. Register the engine with AddDrasi and let the generic host start and stop it.
  • Real-time dashboards. Stream live query results over your own channel (WebSocket, SignalR, gRPC).
  • In-app reactive logic. Replace hand-wired events with declarative continuous queries over application state.

Documentation

Everything you need to build with Drasi, from a first continuous query to the full API.