Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keeping my Stored Procedures in sync with my BusinessObj
Message
From
24/11/2008 18:12:59
 
 
To
24/11/2008 11:19:16
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
01363340
Message ID:
01363867
Views:
13
Mike -- I just wanted to second what Paul said about using a tool for this ... either store-bought <g> or homegrown. We use a homegrown tool ... it started out very simple in the early days (similar to Paul's ... we'd just give it a Stored Proc name and it would generate our class, which in our case was simply an .xsd). Now the tool has been tweaked to do a whole bunch of other stuff besides this and I don't even know what it's doing anymore, it got really complicated (I'm not in charge of it).

~~Bonnie



>>>Trying to map all of my Select Stored Procs to the same Business Object is getting tough. I had hoped other developers would offer their methods to make sure the structure stays in sync.
>>>
>>>Thanks for the reply. I think it's a good idea and was looking for somebody to either raise a red flag or say it was a good idea. Thanks!
>>
>>I think a lot of us are using various tools like Codesmith, My Generation, homegrown, etc. to build our Entities for us automatically. Essentially the tool calls and/or looks at a given table/view/stored proc. then builds the wrapper class based off of it.
>>
>>Most of my stored procs. where I do this map fairly reasonably onto an existing entity built from my tables (that is, the stored proc. returns a subset or superset of the table). I've been pretty lazy so far - in the few cases where I wanted strongly typed access to those additional fields, I just manually added the code. In most other cases I just fall back to accessing them via table.Rows[0]["RowName" style syntax. Ugly but it doesn't seem to come up that often in the stuff I've been working on.
>
>I see. Thanks for the input.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform