PostgreSQL persistence for OpenSleigh.
$ dotnet add package OpenSleigh.Persistence.PostgreSQLPostgreSQL Persistence library for OpenSleigh
This library can be installed from Nuget: https://www.nuget.org/packages/OpenSleigh.Persistence.PostgreSQL/
The first thing to do is build an instance of SqlConfiguration with the connection details. This can be done by reading the current app configuration.
Once done, all you have to do is to call the UsePostgreSqlPersistence extension method:
services.AddOpenSleigh(cfg =>{
var connectionString = Configuration.GetConnectionString("sql");
var sqlCfg = new SqlConfiguration(connectionString);
cfg.UsePostgreSqlPersistence(sqlCfg);
// register the Sagas here
});
Of course it can be used in conjunction with any other Transport library as well (eg. InMemory or RabbitMQ.