private async Task CreateDatabase() { Debug.WriteLine($"Creating database {_databaseName}"); var commandText = $"CREATE DATABASE {_databaseName}"; using (var connection = new SqlConnection(_masterConnectionString)) { await connection.OpenAsync().NotOnCapturedContext(); using (var command = new SqlCommand(commandText, connection)) { await command.ExecuteNonQueryAsync().NotOnCapturedContext(); } } BaseInstaller installer = new MsSqlMessageStoreInstaller(ConnectionString); await installer.Execute(); installer = new MsSqlProjectorsInstaller(ConnectionString); await installer.Execute(); _databaseCreated = true; }
private static async Task Install() { var installer = new MsSqlProjectorsInstaller(connectionString); await installer.Execute(); }