Table of Contents

Class InboxServiceCollectionExtensions

Namespace
Trellis.EntityFrameworkCore
Assembly
Trellis.EntityFrameworkCore.Inbox.dll

Registers the transactional inbox for a DbContext.

public static class InboxServiceCollectionExtensions
Inheritance
InboxServiceCollectionExtensions
Inherited Members

Methods

AddTrellisInbox<TContext>(IServiceCollection, Action<InboxOptions>)

Registers the inbox dispatcher (IInboxDispatcher) and EF store (Trellis.IInboxStore) for TContext. Pair this with AddTrellisInbox(ModelBuilder) in the context's OnModelCreating, and register the integration-event handlers that should consume the messages (for example via AddIntegrationEventHandler<TEvent, THandler>()).

public static IServiceCollection AddTrellisInbox<TContext>(this IServiceCollection services, Action<InboxOptions> configure) where TContext : DbContext

Parameters

services IServiceCollection

The service collection.

configure Action<InboxOptions>

Inbox configuration; ConsumerId is required.

Returns

IServiceCollection

The same service collection for chaining.

Type Parameters

TContext

The consumer's DbContext that owns the inbox table.