title: How to handle data from sqlite query?
body: <p>I have a sqlite-query that gets the following data:</p>
  
  <pre><code>    private GetAllPlayerAttributesFromDB()
  {
      IDbCommand dbcmd = dbconn.CreateCommand();
  
      string sqlQueryPlayer = "SELECT player_id, ability_id, value FROM playerabilities";
      dbcmd.CommandText = sqlQueryPlayer;
      IDataReader reader = dbcmd.ExecuteReader();
  
      IDictionary&lt;int, int&gt; dict = new Dictionary&lt;int, int&gt;();
  
      while (reader.Read())
      {
        int player_id = reader.GetInt32(0);
        int ability_id = reader.GetInt32(1);
        int value= reader.GetInt32(2);
  
         // I have no idea how to save the data now
         dict.Add(ability_id, value);
      }
  
      reader.Close();
      reader = null;
      dbcmd.Dispose();
      dbcmd = null;
  }
  
  
  
  ╔════════════╦════════════╦═══════╗
  ║ player_id  ║ ability_id ║ value ║
  ╠════════════╬════════════╬═══════╣
  ║ "16"       ║ "0"        ║ "56"  ║
  ║ "16"       ║ "1"        ║ "52"  ║
  ║ "16"       ║ "2"        ║ "62"  ║
  ║ "16"       ║ "3"        ║ "72"  ║
  ║ "16"       ║ "4"        ║ "64"  ║
  ║ "28"       ║ "0"        ║ "41"  ║
  ║ "28"       ║ "1"        ║ "49"  ║
  ║ "28"       ║ "2"        ║ "55"  ║
  ║ "28"       ║ "3"        ║ "60"  ║
  ║ "28"       ║ "4"        ║ "65"  ║
  ║ "41"       ║ "0"        ║ "72"  ║
  ║ "41"       ║ "1"        ║ "71"  ║
  ║ "41"       ║ "2"        ║ "79"  ║
  ║ "41"       ║ "3"        ║ "84"  ║
  ║ "41"       ║ "4"        ║ "52"  ║
  ╚════════════╩════════════╩═══════╝
  </code></pre>
  
  <p><strong>How I want the use the data:</strong>
  I want to get all abilities and values from one player by using his player_id as key. For example if I need the data from player 16, then I want to get (0, 56), (1,52), (2, 62)... or an array with int[] values = [56, 52, 62, 72, 64] for each player.</p>
  
  <p>Now I want to save this data in a performant way. In PHP I would use an associative array. How could I do this in C#? (I have read some examples about dictionaries, but I am not able to use them for my problem. Maybe dictionaries are the wrong approach for this?)</p>