protected override void Load(ContainerBuilder bldr)
        {
            var asseblies = AppDomain.CurrentDomain.GetAssemblies();

            var sqlServerViewRepositoryConfiguration = new SqlServerViewRepositoryConfiguration(_connectionString);

            bldr.RegisterInstance(sqlServerViewRepositoryConfiguration)
            .As <ISqlServerViewRepositoryConfiguration>();

            bldr.RegisterType <SqlServerViewRepository>()
            .As <IViewRepository>();

            bldr.RegisterType <SequencedNEventStore <TEventBase> >()
            .As <ISequencedEventStore <TEventBase> >();

            bldr.RegisterType <ProjectionRepository <TEventBase> >()
            .As <IProjectionRepository <TEventBase> >();

            bldr.RegisterType <AggregateRepository <TEventBase> >()
            .As <IAggregateRepository <TEventBase> >();

            bldr.RegisterAssemblyTypes(asseblies)
            .Where(a => a.GetInterfaces().Any(i => i.IsAssignableFrom(typeof(IProjectionBuilder <TEventBase>))))
            .AsImplementedInterfaces()
            .PropertiesAutowired();

            bldr.RegisterInstance(GetEventSource())
            .As <IStoreEvents>();
        }
        public Module GetModule <TEventBase>() where TEventBase : class, new()
        {
            if (string.IsNullOrEmpty(_connectionString))
            {
                _connectionString = ConfigurationManager.ConnectionStrings["SequencedAggregate"].ConnectionString;
            }

            var sqlViewRepositoryConfiguration = new SqlServerViewRepositoryConfiguration(_connectionString);
            var sqlViewRepository = new SqlServerViewRepository(sqlViewRepositoryConfiguration);

            sqlViewRepository.CreateProjectionsTable();

            return(new SequencedAggregateModule <TEventBase>(_connectionString));
        }