예제 #1
0
        public void InsertInitialData()
        {
            using (SqlConnection connection = new SqlConnection(sqlConnectionString))
            {
                connection.Open();

                var tableInserts = SQLStatements.InsertTablesStatements();

                exec.ExecuteNonQuery(connection, tableInserts);
            }
        }
예제 #2
0
        public void InitializeMinionsDB()
        {
            using (SqlConnection connection = new SqlConnection(sqlConnectionStringMaster))
            {
                connection.Open();

                var createMinionsDB = SQLStatements.CreateDBStatements();

                exec.ExecuteNonQuery(connection, createMinionsDB);
            }
            using (SqlConnection connection = new SqlConnection(sqlConnectionString))
            {
                connection.Open();

                var createTables = SQLStatements.CreateTablesStatements();

                exec.ExecuteNonQuery(connection, createTables);
            }
        }