Exemplo n.º 1
0
        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));
        }