コード例 #1
0
        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();
                }
            }
        }
コード例 #2
0
ファイル: MsSqlTestHelper.cs プロジェクト: Red-F/Paramore
        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();
                }
            }
        }
コード例 #3
0
        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();
                }
        }