Example #1
0
 public static IServiceCollection AddImGalaxyESEventStoreModule(this IServiceCollection services, Action <IEventStoreConfigurations> configurations) =>
 services.With(s =>
 {
     var configs = new EventStoreConfigurations().With(c => configurations(c));
     s.RegisterConfigurations(configs)
     .RegisterProviders()
     .RegisterChangeTracker()
     .RegisterEventStore()
     .RegisterAggregateStore()
     .RegisterRepositories()
     .RegisterSnapshotableRepositories(configs)
     .RegisterUnitOfWork();
 });
Example #2
0
 private static IServiceCollection RegisterConfigurations(this IServiceCollection services, EventStoreConfigurations configurations) =>
 services.AddSingleton <IEventStoreConfigurations>(provider => configurations);