public static void AddLiteDbEventStorage(this ServiceCollection services, Action<LiteDBOptions> optionAction)
 {
     var options = new LiteDBOptions();
     optionAction(options);
     services.AddScoped(x => options);
     services.AddScoped<EventStorageLiteDatabase>();
     services.AddScoped<IEventStorageRepository, EventStorageRepository>();
     services.AddScoped<IMementoRepository, EventStorageRepository>();
     services.AddScoped<IEventStorage, SqlEventStorage>();
 }
        public static void UseLiteDbEventStorage(this ShriekOptionBuilder builder, Action <LiteDBOptions> optionAction)
        {
            var options = new LiteDBOptions();

            optionAction(options);
            builder.Services.AddScoped(x => options);
            builder.Services.AddScoped <EventStorageLiteDatabase>();
            builder.Services.AddScoped <IEventStorageRepository, EventStorageRepository>();
            builder.Services.AddScoped <IMementoRepository, EventStorageRepository>();
            builder.Services.AddScoped <IEventStorage, SqlEventStorage>();
        }
 public EventStorageLiteDatabase(LiteDBOptions options) : base(options.ConnectionString, options.Mapper)
 {
 }