Table of Contents

Class OutboxModelBuilderExtensions

Namespace
Trellis.EntityFrameworkCore
Assembly
Trellis.EntityFrameworkCore.Outbox.dll

EF Core model and interceptor hooks for the transactional outbox.

public static class OutboxModelBuilderExtensions
Inheritance
OutboxModelBuilderExtensions
Inherited Members

Methods

AddTrellisOutbox(ModelBuilder)

Maps the OutboxMessage table onto the model. Call from OnModelCreating.

public static ModelBuilder AddTrellisOutbox(this ModelBuilder modelBuilder)

Parameters

modelBuilder ModelBuilder

The model builder.

Returns

ModelBuilder

The same model builder for chaining.

AddTrellisOutboxInterceptor(DbContextOptionsBuilder)

Adds the outbox capture interceptor so uncommitted domain events are written to the outbox table in the same transaction as the aggregate change. Call on the DbContextOptionsBuilder.

public static DbContextOptionsBuilder AddTrellisOutboxInterceptor(this DbContextOptionsBuilder optionsBuilder)

Parameters

optionsBuilder DbContextOptionsBuilder

The options builder.

Returns

DbContextOptionsBuilder

The same options builder for chaining.

AddTrellisOutboxInterceptor<TContext>(DbContextOptionsBuilder<TContext>)

Adds the outbox capture interceptor so uncommitted domain events are written to the outbox table in the same transaction as the aggregate change. Call on the DbContextOptionsBuilder.

public static DbContextOptionsBuilder<TContext> AddTrellisOutboxInterceptor<TContext>(this DbContextOptionsBuilder<TContext> optionsBuilder) where TContext : DbContext

Parameters

optionsBuilder DbContextOptionsBuilder<TContext>

The options builder.

Returns

DbContextOptionsBuilder<TContext>

The same options builder for chaining.

Type Parameters

TContext

The DbContext type.