A feature I would love to see in SSMS would be the ability to write plug-ins – a little more easily – that would allow developers to hook-up templates and actions to objects on the design surface.
As an example, here’s a shot of a couple of selected tables (from a throw-away sample…don’t mind the conventions!):
When I right-click on these tables, I would like to invoke an action/template that could start some code generation. Much like right-clicking on a table in the Object Explorer allows you to Script Table –> INSERT to –> Clipboard, I would like to be able to setup a template that allowed for more complicated code to be generated.
Here’s one that I would do: create a multi-insert stored proc template that took n tables as parameters. When invoked, it would create a stored procedure that would take care of things like inserting the parameters (while omitting the identity columns), ordering the inserts to satisfy relationships, storing SCOPE_IDENTITY() into locally declared vars as it works, etc.
There’s still too much grunt work in creating stored procs. Dunno, maybe I’m just too lazy ;o)
No comments:
Post a Comment