Click here to Skip to main content
15,888,046 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Tell me why... Pin
PIEBALDconsult4-May-20 4:50
mvePIEBALDconsult4-May-20 4:50 
GeneralRe: Tell me why... Pin
Sander Rossel4-May-20 7:49
professionalSander Rossel4-May-20 7:49 
GeneralRe: Tell me why... Pin
David O'Neil4-May-20 8:48
professionalDavid O'Neil4-May-20 8:48 
GeneralLet the smoke out Pin
lopatir4-May-20 1:49
lopatir4-May-20 1:49 
GeneralRe: Let the smoke out Pin
glennPattonWork34-May-20 2:17
professionalglennPattonWork34-May-20 2:17 
GeneralRe: Let the smoke out Pin
raddevus4-May-20 3:24
mvaraddevus4-May-20 3:24 
JokeRe: Let the smoke out Pin
obermd5-May-20 3:25
obermd5-May-20 3:25 
GeneralEntity Factory Drudgery Pin
#realJSOP4-May-20 1:26
mve#realJSOP4-May-20 1:26 
So, I've been working on this app that will generate model and viewmodel classes from stored procs in the specified database. It's intended for folks like me, that abhor the thought of using a UDM, or that find the ADO.Net project in Visual Studio to the quagmire of failure that it is.

Every time I think I've reached a point where I think I'm finally done, I think of something else that really must be included in the app.

0) It would be nice if I could do the same thing with tables and views. Result : a new wizard page, a new window, and a crapload of refactoring in the code generator. Thought I was finally done...

1) I decided to try out the long-ignored stored proc generator. Result: new window to handle procs with input parameters, and fixing some generator code. Thought I was finally done...

2) I decided I wanted to add more flexibility where the viewmodel generation was concerned. Result: Completely refactoring the settings wizard page, adding a help window for viewmodel settings, and adding code to react to the new settings. Thought I was finally done...

3) Item #3 is boycotted today. This item will not appear in any of my enumerated lists for the remainder of the day.

4) It might be nice to add properties that provide CRUD queries for tables. Result : adding code to the code generator that does creates the queries, and adding a number of new app settings to allow some flexibility. Thought I was finally done...

5) In the process of adding the CRUD stuff, a dilemma arose regarding how to identify the column that would control update and delete functionality. Originally, I looked for a column with the text "ID" in it. I sat there looking at the code, and thought, "Not everybody is as pragmatic as I am in their column naming habits, so I, after a little research, I discovered that the ADO DataColumn object contained properties to help you find columns that auto-increment and that are read-only. So, I changed the code to retain and look for those properties to identify the most likely ID column. The whole detection code block turned into a three-tier setup, where I look for the autoincrement/readonly column, fall back to one that looks for "ID" in the name, and then finally, simply use the first column in the returned schema.

Unless you count testing, testing, and more testing, and then writing the actual article series, I think I'm finally done...

Famous last words, right?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013


modified 4-May-20 10:08am.

GeneralRe: Entity Factory Drudgery Pin
RickZeeland4-May-20 1:37
mveRickZeeland4-May-20 1:37 
GeneralRe: Entity Factory Drudgery Pin
#realJSOP4-May-20 1:50
mve#realJSOP4-May-20 1:50 
GeneralRe: Entity Factory Drudgery Pin
Nelek4-May-20 1:55
protectorNelek4-May-20 1:55 
GeneralRe: Entity Factory Drudgery Pin
#realJSOP4-May-20 2:11
mve#realJSOP4-May-20 2:11 
GeneralRe: Entity Factory Drudgery Pin
kalberts4-May-20 3:50
kalberts4-May-20 3:50 
GeneralRe: Entity Factory Drudgery Pin
#realJSOP4-May-20 4:02
mve#realJSOP4-May-20 4:02 
GeneralRe: Entity Factory Drudgery Pin
Dan Neely4-May-20 2:46
Dan Neely4-May-20 2:46 
GeneralRe: Entity Factory Drudgery Pin
#realJSOP4-May-20 4:06
mve#realJSOP4-May-20 4:06 
GeneralRe: Entity Factory Drudgery Pin
Mycroft Holmes4-May-20 12:54
professionalMycroft Holmes4-May-20 12:54 
GeneralRe: Entity Factory Drudgery Pin
kmoorevs5-May-20 4:46
kmoorevs5-May-20 4:46 
GeneralRe: Entity Factory Drudgery Pin
#realJSOP5-May-20 8:06
mve#realJSOP5-May-20 8:06 
GeneralWhy Dark-Side Bob? Pin
W Balboos, GHB4-May-20 1:04
W Balboos, GHB4-May-20 1:04 
GeneralRe: Why Dark-Side Bob? Pin
musefan4-May-20 1:08
musefan4-May-20 1:08 
GeneralRe: Why Dark-Side Bob? Pin
W Balboos, GHB4-May-20 1:17
W Balboos, GHB4-May-20 1:17 
GeneralRe: Why Dark-Side Bob? Pin
Rage4-May-20 1:30
professionalRage4-May-20 1:30 
GeneralRe: Why Dark-Side Bob? Pin
Sean Ewington4-May-20 3:34
staffSean Ewington4-May-20 3:34 
GeneralRe: Why Dark-Side Bob? Pin
#realJSOP4-May-20 1:27
mve#realJSOP4-May-20 1:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.