public void CreateMessageStoreTable() { using (var connection = new SqlConnection(ConnectionString)) { _tableName = "message_" + _tableName; string createTableSql = SqlMessageStoreBuilder.GetDDL(_tableName); connection.Open(); using (var command = connection.CreateCommand()) { command.CommandText = createTableSql; command.ExecuteNonQuery(); } } }
public void CreateMessageStoreTable() { using (var connection = new SqlConnection(_sqlSettings.TestsBrighterConnectionString)) { _tableName = $"[message_{_tableName}]"; var createTableSql = SqlMessageStoreBuilder.GetDDL(_tableName); connection.Open(); using (var command = connection.CreateCommand()) { command.CommandText = createTableSql; command.ExecuteNonQuery(); } } }
private static void CreateTestDb() { var en = new SqlCeEngine(ConnectionString); en.CreateDatabase(); var sql = SqlMessageStoreBuilder.GetDDL(TableName); using (var cnn = new SqlCeConnection(ConnectionString)) using (var cmd = cnn.CreateCommand()) { cmd.CommandText = sql; cnn.Open(); cmd.ExecuteNonQuery(); } }