« Multiple Form Configurations with ASP.NET Dynamic Data | Main | Silverlight 4 OOB: Please remove the My-Folders restriction. It doesn't work anyways. »

03/09/2009

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a012876b389bb970c012876c21702970c

Listed below are links to weblogs that reference Dynamic Data: Partial/Scaffolding Class Generator:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Andy Pook

Isn't this the kind of thing that T4 is for?

Ingo Rammer

Andy: Yes. In practice however there would be a few issues. First, the TT template would quite likely be longer (and substantially more complex) than the version above as you'd have to parse the EDMX instead of the DLL. (Yes, you *could* parse the DLL, too ... it just wouldn't feel too natural as the TT's output would always be delayed by one rebuild cycle ... ). But the main issue is that the TT file would re-generate the generated code on every save unless the TT is removed from the project after the initial compilation. (Asp.net MVC for example supports a special "run once"-kind of mode for TT ... ).

All in all, I think the approach above is more readable, shorter and better gets the point across, that this is a run-once code gen.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Shared items (Google Reader)