views:

185

answers:

2

I'm wondering if anyone has come across any existing T4 templates to reverse engineer a database into a first cut at an ASPX GUI. It would be nice to be able to design your database, run it through a code generator for the data access layer, but also generate a simple GUI.

As a simple example, for each table in the database, create something like:

<asp:textbox id="theColumnName" maxlength="theColumnMaxWidth" runat="server"/>
<asp:checkbox id="theColumnName" runat="server"/>
<asp:dropdownlist id="theColumnName" runat="server"/>  (dropdownlist was generated because a foreign key was detected)
...etc

Preferably, each table would be generated into its own file, not sure if this is possible though.

So obviously its not something that will do all the work for you, it is just a first cut that would generate into a \GuiTemplate folder, and from there one could copy/paste into your actual code file.

+2  A: 

Check out ASP.NET Dynamic Data on MSDN, and the videos on ASP.NET learning section. It sounds like that's what you're looking for.

You create a datacontext by dropping your tables in the designer, and it then dynamically builds a nice and simple CRUD interface. It's pretty cool, actually. :)

Jakob Gade
No I don't think that's what I'm looking for....I'm trying to avoid MS abstractions as much as possible. Thanks for the suggestion though!
tbone
+2  A: 

I believe SubSonic does this, you may want to look there to see what they are doing.

Actually, I believe SubSonic would get you most of the way there (including GUI screens), so you may just want to use that all together.

Michael Maddox