int CallProcInsertDungeonEntry(MySqlConnection connection, MySqlTransaction transaction, DataWorld world, DataDungeon dungeon) { using (MySqlCommand command = new MySqlCommand("insert_dungeon_entry", connection, transaction)) { command.CommandType = System.Data.CommandType.StoredProcedure; command.Parameters.AddWithValue("@did", dungeon.Id); command.Parameters.AddWithValue("@world_id", world.Id); command.Parameters.AddWithValue("@series_id", dungeon.SeriesId); command.Parameters.AddWithValue("@dname", dungeon.Name); command.Parameters.AddWithValue("@dtype", dungeon.Type); command.Parameters.AddWithValue("@ddiff", dungeon.Difficulty); return(command.ExecuteNonQuery()); } }
int CallProcInsertWorldEntry(MySqlConnection connection, MySqlTransaction transaction, DataWorld world) { using (MySqlCommand command = new MySqlCommand("insert_world_entry", connection, transaction)) { command.CommandType = System.Data.CommandType.StoredProcedure; command.Parameters.AddWithValue("@wid", world.Id); command.Parameters.AddWithValue("@series", world.SeriesId); command.Parameters.AddWithValue("@type", world.Type); command.Parameters.AddWithValue("@name", world.Name); return(command.ExecuteNonQuery()); } }