Table of Contents

Class EventSourcingBuilderPostgresExtensions

Namespace
Excalibur.EventSourcing.Postgres
Assembly
Excalibur.EventSourcing.Postgres.dll

Extension methods for configuring Postgres event sourcing on IEventSourcingBuilder.

public static class EventSourcingBuilderPostgresExtensions
Inheritance
EventSourcingBuilderPostgresExtensions
Inherited Members

Methods

UsePostgres(IEventSourcingBuilder, Action<IPostgresEventSourcingBuilder>)

Configures the event sourcing builder to use Postgres for event store and snapshot store.

public static IEventSourcingBuilder UsePostgres(this IEventSourcingBuilder builder, Action<IPostgresEventSourcingBuilder> configure)

Parameters

builder IEventSourcingBuilder

The event sourcing builder.

configure Action<IPostgresEventSourcingBuilder>

Configuration action for the Postgres event sourcing builder.

Returns

IEventSourcingBuilder

The builder for fluent chaining.

Examples

services.AddExcalibur(x => x.AddEventSourcing(es =>
{
    es.UsePostgres(pg =>
    {
        pg.ConnectionString(configuration.GetConnectionString("EventStore")!)
          .EventStoreSchema("public");
    })
    .AddRepository<OrderAggregate, Guid>();
}));

Exceptions

ArgumentNullException

Thrown when builder or configure is null.