title: Model for listing Items
body: <p>I want to list names from database based on the alias ID</p>
  
  <pre><code>public class Name
  {
      int _nameID,_aliasID;
      string _nameNA;
  }
  
  
  
   public List&lt;Name&gt; Names(int aliasID)
      {
          List&lt;Name&gt; nm = new List&lt;Name&gt;();
          using (DatabaseCommaned cmd=new DatabaseCommaned("SELECT NA FROM dbo.tName WHERE AliasID="+aliasID+""))
              {
                  try
                  {
                      SqlDataReader rdr = new SqlDataReader();
                      while (rdr.Read())
                      {
                          Name n = new Name();
                          n.nameNA=(string)rdr["NA"];
  
                          Add nm(n);                             
                      }
  
                  }
  
              }
  
          return nm;
      }
  </code></pre>
  
  <p>These are my classes. I cant take this from reader. How it possible. putting underscore in the variable, make difficult. Is this right way . Or please tell me the other ways.</p>