public static IDomainBuilder AddMongo(this IDomainBuilder builder, IConfiguration configuration)
        {
            builder.AddMongoOptions(configuration);

            builder.Services.TryAdd(new ServiceCollection()
                                    .AddSingleton <IEventStore, MongoEventStore>()
                                    .AddSingleton <ISubscribeEventStore, MongoSubscribeEventStore>()
                                    .AddSingleton <ISnapshootQueryFactory, MongoSnapshootQueryFactory>()
                                    .AddSingleton <ISnapshootStoreFactory, MongoSnapshootStoreFactory>()
                                    .AddSingleton <IDatabaseInitializer, MongoDatabaseInitializer>()
                                    );


            return(builder);
        }