public static IServiceCollection ConfigureMarten(this IServiceCollection services,
                                                         Action <IServiceProvider, StoreOptions> configure)
        {
            var configureMarten = new LambdaConfigureMarten(configure);

            services.AddSingleton <IConfigureMarten>(configureMarten);
            return(services);
        }
        public static IServiceCollection ConfigureMarten <T>(this IServiceCollection services,
                                                             Action <StoreOptions> configure) where T : IDocumentStore
        {
            var configureMarten = new LambdaConfigureMarten <T>((s, opts) => configure(opts));

            services.AddSingleton <IConfigureMarten <T> >(configureMarten);
            return(services);
        }