title: Return a list of a Entity class
body: <p>This is my Class:  </p>
  
  <pre><code>public class Customer
     {
        public int ID { get; set; }
  
        public string Card_ID { get; set; }
  
        public double Cash { get; set; }
  
        public string Name { get; set; }
  
        public Image Photo { get; set; }
     }  
  </code></pre>
  
  <p>I need to make a <code>SELECT</code> on my database to get some information of the <code>customer</code>, I used to use <code>DataSet</code> but I saw it's not the best choice when it comes to performance. Also I need to read only 2 or 3 fields, I started this method:  </p>
  
  <pre><code>public List&lt;Customer&gt; ConsultCustomerData(string cardID)
     {
        list&lt;Customer&gt; customer = null;
        string sql = "SELECT name, cash FROM customers WHERE card_id = @cardID";            
         try
            {
               MySqlCommand cmd = new MySqlCommand();
               cmd.CommandText = sql;
               cmd.CommandType = CommandType.Text;
               cmd.Parameters.Add(new MySqlParameter("@cardID", MySqlDbType.VarChar)).Value = cardID;
  
             }
          catch (Exception ex)
            {
              throw new Exception(ex.Message);
            }
     }  
  </code></pre>
  
  <p>Now I don't know how to continue...<br>
  How may I return those informations using <code>List</code> or <code>IList</code> ?</p>