title: Generate class from database table
body: <p>How can I generate a class from a SQL Server table object?</p>
  
  <p>I'm not talking about using some ORM. I just need to create the entities (simple class). Something like:</p>
  
  <pre class="lang-cs prettyprint-override"><code>    public class Person 
      {
          public string Name { get;set; }
          public string Phone { get;set; }
      }
  </code></pre>
  
  <p>Given some table like:</p>
  
  <pre><code>+----+-------+----------------+
  | ID | Name  |     Phone      |
  +----+-------+----------------+
  |  1 | Alice | (555) 555-5550 |
  |  2 | Bob   | (555) 555-5551 |
  |  3 | Cathy | (555) 555-5552 |
  +----+-------+----------------+
  
  
  </code></pre>