Skip to content

Event Store Multi-Tenancy

TIP

The V4 version of the async daemon is able to fully support multi-tenanted event store projections now.

The event store feature in Marten supports an opt-in multi-tenancy model that captures events by the current tenant. Use this syntax to specify that:

var store = DocumentStore.For(opts =>
{
    opts.Connection("some connection string");

    // And that's all it takes, the events are now multi-tenanted
    opts.Events.TenancyStyle = TenancyStyle.Conjoined;
});

snippet source | anchor