mrmorrandir / EventSourcing

An event sourcing library with an EF Core based persistence (in order to use MSSQL and other relational databases that are available in corporate scopes).
MIT License
1 stars 0 forks source link

Merge 3-integrate-all-configuration-into-addeventsourcing-config-action to main #14

Closed mrmorrandir closed 6 months ago

mrmorrandir commented 6 months ago

All the configuration is now done inside the AddEventSourcing(config => { ... }) method.

Example:

 services.AddEventSourcing(options =>
        {
            options.ConfigureEventStoreDbContext(dbOptions => dbOptions.UseInMemoryDatabase("Test"));
            options.ConfigureMapping(mappingOptions => mappingOptions.AddMappers(typeof(ValidAssembly.Events.CustomEvent).Assembly));
            options.ConfigureProjections(projectionOptions => projectionOptions.AddProjections(typeof(ValidAssembly.Events.CustomEvent).Assembly));
        });