How can I generate a class from a SQL Server table object?

I’m not talking about using some ORM. I just need to create the entities (simple class). Something like:

    public class Person 
    {
        public string Name { get;set; }
        public string Phone { get;set; }
    }

Given some table like:

+----+-------+----------------+
| ID | Name  |     Phone      |
+----+-------+----------------+
|  1 | Alice | (555) 555-5550 |
|  2 | Bob   | (555) 555-5551 |
|  3 | Cathy | (555) 555-5552 |
+----+-------+----------------+


30 Answers
30

Leave a Reply

Your email address will not be published. Required fields are marked *