views:

152

answers:

4

Anyone know of a simple tool to quickly create POCO classes based on an existing database?

I am just looking to create the POCO classes that could be used with any ORM that supports it so my interface and model can remain independent.

+1  A: 

Try CodeSmith is very good application.

Florim Maxhuni
A: 

Hm, haven't tried this myself, but from a high-level, you may wish to try this

  1. Use DataSet in your application to retrieve DB Schema
  2. Generate an Xsd from your DataSet for each target table
  3. Use Xsd.exe to create auto-generated Data Transport Objects [DTO], aka Plain Old C# Objects [POCO]
johnny g
A: 

I highly suggest Subsonic. I've been using it for years and it works great. It should do exactly what you want.

WVDominick
A: 

Microsoft has this nifty little tool called LINQ to SQL :-).

And before anyone starts complaining, LINQ to SQL can do POCO.

Steven
Reference, link?
Kjensen
Did you try: http://www.google.nl/search?q=LINQ+to+SQL+POCO ?
Steven