Click here to Skip to main content
15,893,486 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: Never Let A Opportunity Go to Waste Pin
#realJSOP28-Nov-20 6:19
mve#realJSOP28-Nov-20 6:19 
GeneralRe: Never Let A Opportunity Go to Waste Pin
honey the codewitch28-Nov-20 6:24
mvahoney the codewitch28-Nov-20 6:24 
GeneralRe: Never Let A Opportunity Go to Waste Pin
Mycroft Holmes28-Nov-20 10:17
professionalMycroft Holmes28-Nov-20 10:17 
GeneralRe: Never Let A Opportunity Go to Waste Pin
honey the codewitch28-Nov-20 10:21
mvahoney the codewitch28-Nov-20 10:21 
GeneralRe: Never Let A Opportunity Go to Waste Pin
Amarnath S27-Nov-20 13:40
professionalAmarnath S27-Nov-20 13:40 
GeneralRe: Never Let A Opportunity Go to Waste Pin
#realJSOP27-Nov-20 22:16
mve#realJSOP27-Nov-20 22:16 
GeneralRe: Never Let A Opportunity Go to Waste Pin
Sander Rossel28-Nov-20 0:55
professionalSander Rossel28-Nov-20 0:55 
GeneralRe: Never Let A Opportunity Go to Waste Pin
#realJSOP28-Nov-20 6:31
mve#realJSOP28-Nov-20 6:31 
Sander Rossel wrote:
I was going to ask why you didn't use a MERGE for the UPSERT, but I already found out myself.


Using the MERGE function is fraught with danger, and it's easy to do it wrong. Furthermore, a MERGE operation is usually more complex, and typically uses several of the table's columns to determine whether or not an item should be updated. There's probably no way to generate it automagically that would be suitable in more than a small handful of instances.

It is simply easier and more reliable to generate an Upsert instead.

The programmer can always extend the generated partial class and include a specific CRUDMerge property, so I think my bases are sufficiently covered. BTW, this is primary reason I'm writing this aapp - the existing tools don't create partial classes, and don't allow you to customize their implementation based on corporate requirements as far as coding style and framework component inclusion. For instance, you can specify your own implementation code for INotifyPropertyChanged, and IDataErrrorInfo interfaces in the generated viewmodel, and you can even specify the standard using statements for the model and viewmodel (although the usefulness of these would only benefit you if a given "standard" name space was removed from .Net at some point in the future).

It's a cool app, and we're going to use it at work when we start our flagship application rewrite (whenever that's allowed to happen).
".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

GeneralRe: Never Let A Opportunity Go to Waste Pin
Sander Rossel28-Nov-20 8:32
professionalSander Rossel28-Nov-20 8:32 
GeneralRe: Never Let A Opportunity Go to Waste Pin
Kelly Herald1-Dec-20 7:15
Kelly Herald1-Dec-20 7:15 
GeneralRe: Never Let A Opportunity Go to Waste Pin
#realJSOP1-Dec-20 10:02
mve#realJSOP1-Dec-20 10:02 
GeneralAt the end... Pin
Joan M27-Nov-20 7:17
professionalJoan M27-Nov-20 7:17 
GeneralRe: At the end... PinPopular
Mladen Janković27-Nov-20 14:13
Mladen Janković27-Nov-20 14:13 
GeneralRe: At the end... Pin
RickZeeland27-Nov-20 18:36
mveRickZeeland27-Nov-20 18:36 
JokeRe: At the end... Pin
Joan M28-Nov-20 0:09
professionalJoan M28-Nov-20 0:09 
GeneralRe: At the end... Pin
honey the codewitch28-Nov-20 3:42
mvahoney the codewitch28-Nov-20 3:42 
GeneralRe: At the end... Pin
Joan M28-Nov-20 11:03
professionalJoan M28-Nov-20 11:03 
GeneralRe: At the end... Pin
dandy7228-Nov-20 4:35
dandy7228-Nov-20 4:35 
GeneralRe: At the end... Pin
Slacker00727-Nov-20 16:40
professionalSlacker00727-Nov-20 16:40 
GeneralRe: At the end... Pin
Chris Losinger28-Nov-20 3:35
professionalChris Losinger28-Nov-20 3:35 
GeneralThought of the Day Pin
OriginalGriff27-Nov-20 4:37
mveOriginalGriff27-Nov-20 4:37 
GeneralRe: Thought of the Day Pin
W Balboos, GHB27-Nov-20 5:40
W Balboos, GHB27-Nov-20 5:40 
GeneralRe: Thought of the Day Pin
Mike Hankey27-Nov-20 5:47
mveMike Hankey27-Nov-20 5:47 
GeneralSpeaking of more mugs below... Pin
Sander Rossel27-Nov-20 4:03
professionalSander Rossel27-Nov-20 4:03 
GeneralRe: Speaking of more mugs below... Pin
honey the codewitch27-Nov-20 4:08
mvahoney the codewitch27-Nov-20 4:08 

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.