CQRS.Tests.CQRS.EventSourcing.Sql.MigratedSqlServerEventStoreSessionTests.CreateStore C# (CSharp) Method

CreateStore() protected method

protected CreateStore ( bool withMigrations = true ) : IEventStore
withMigrations bool
return IEventStore
        protected IEventStore CreateStore(bool withMigrations = true)
        {
            var migrations = withMigrations ? (IEnumerable<IEventMigration>)new EventMigration<IRootEvent>[]
                                                           {
                                                               Before<UserRegistered>.Insert<MigratedBeforeUserRegisteredEvent>(),
                                                               After<UserChangedEmail>.Insert<MigratedAfterUserChangedEmailEvent>()
                                                           }: new List<IEventMigration>();
            return new SqlServerEventStore(_connectionString, new SingleThreadUseGuard(), nameMapper: null, migrations: migrations);

        }