Drasi .NET
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.
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
AddDrasiand 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.
Engine, grouped by area.Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.