Example #1
0
        public async Task <MsSqlStreamStore> GetStreamStore_v1Schema()
        {
            await CreateDatabase();

            var settings = new MsSqlStreamStoreSettings(ConnectionString)
            {
                Schema    = _schema,
                GetUtcNow = () => GetUtcNow()
            };
            var store = new MsSqlStreamStore(settings);
            await store.CreateSchema_v1_ForTests();

            return(store);
        }
        private async Task Init(bool createV1Schema = false)
        {
            await _databaseInstance.CreateDatabase();

            var settings = new MsSqlStreamStoreSettings(ConnectionString)
            {
                Schema    = _schema,
                GetUtcNow = () => GetUtcNow(),
            };

            Store = new MsSqlStreamStore(settings);
            if (_createSchema)
            {
                if (createV1Schema)
                {
                    await Store.CreateSchema_v1_ForTests();
                }
                else
                {
                    await Store.CreateSchema();
                }
            }
        }