Few days back I blogged about generating the code using
the CodeDom classes. You can view that post over here. I worked on it for a little more and now you
can input the namespace, class name, database name and the table name from the
console. Below you can see a screen shot of the code generator which creates the
entity class for the Categories table in the Northwind
database.

As, you can see that you will have to give the inputs in the required format
which is the following:
NameSpace:ClassName: DatabaseName:TableName
Finally, when the code is generated you can also save the generated code in
the .cs file. You will find that section in the download sample.
I hope that this code generator will help you in your project and saves you
time. I will be writing a detailed article on this topic in couple of days which
will be published on www.gridviewguy.com.
You can download the complete project from the link below:
[Download Project]
powered by IMHO 1.3