public void Execute(MySqlConnection connection, MySqlTransaction transaction) { string stmt = "SELECT * FROM worlds"; using (MySqlCommand command = new MySqlCommand(stmt, connection, transaction)) { using (MySqlDataReader reader = command.ExecuteReader()) { while (reader.Read()) { DataCache.Worlds.Key key = new DataCache.Worlds.Key(); DataCache.Worlds.Data data = new DataCache.Worlds.Data(); key.WorldId = (uint)reader["id"]; data.Name = (string)reader["name"]; data.Series = (uint)reader["series"]; data.Type = (SchemaConstants.WorldType)reader["type"]; mWorlds.Update(key, data); } } } }
public WorldListItem(DataCache.Worlds.Key key, DataCache.Worlds.Data data) { mKey = key; mData = data; }