title: Sum X Values from Database
body: <p>In my database SQLServer, I´ve got a associative table <code>ID</code> with <code>KID</code> and <code>amount</code>. I want to sum up the values from every ID. That means that I want to have the amount from KID 6, the KID 10 etc.. </p>
  
  <p>My problem is, that I don´t know how to do this because there can be many values for one KID, and there can be about 100 KIDs. </p>
  
  <p>I want to do that whole thing in C#. What is the best way? And what is the best way save in? Array, List?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I need to do it in C# with a SqlCommand because I need the values in my application!</p>
  
  <p><strong>EDIT 2:</strong></p>
  
  <p>LINQ to SQL isn´t possible because I don´t have any Entity-objects.
  I want to do it with SQLReader or something like that. Is that possible?</p>