예제 #1
0
        public async Task TestMethod1()
        {
            var streamId = Guid.NewGuid();
            var created  = DateTimeOffset.Now;

            var EventStore = new SqlEventStore(@"Server=tcp:wtxqsopwyb.database.windows.net,1433;Initial Catalog=event-store;Persist Security Info=False;User ID=john;Password=YCWJ^QNMZmmDF36F;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;");

            await EventStore.Database.InitializeAsync();

            // see https://docs.microsoft.com/en-us/azure/sql-database/sql-database-dtu-resource-limits

            // S0
            //await ForEachAsync(GetTestDataStream(10000), e => EventStore.AppendAsync(new[] { e }), 60);

            // S3
            //await ForEachAsync(GetTestDataStream(10000), e => EventStore.AppendAsync(new[] { e }), 200);

            // S6
            //await ForEachAsync(GetTestDataStream(10000), e => EventStore.AppendAsync(new[] { e }), 200);

            // S9
            await ForEachAsync(GetTestDataStream(10000), e => EventStore.AppendAsync(new[] { e }), 400);
        }