Click here to Skip to main content
15,901,283 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: That moment when a lot of difficult work becomes a five minute job... Pin
Marc Clifton4-Mar-18 4:01
mvaMarc Clifton4-Mar-18 4:01 
GeneralRe: That moment when a lot of difficult work becomes a five minute job... Pin
Sander Rossel4-Mar-18 6:21
professionalSander Rossel4-Mar-18 6:21 
PraiseRe: That moment when a lot of difficult work becomes a five minute job... Pin
RickZeeland4-Mar-18 4:35
mveRickZeeland4-Mar-18 4:35 
GeneralRe: That moment when a lot of difficult work becomes a five minute job... Pin
Sander Rossel4-Mar-18 6:23
professionalSander Rossel4-Mar-18 6:23 
GeneralRe: That moment when a lot of difficult work becomes a five minute job... Pin
RickZeeland4-Mar-18 6:30
mveRickZeeland4-Mar-18 6:30 
GeneralRe: That moment when a lot of difficult work becomes a five minute job... Pin
#realJSOP5-Mar-18 1:03
professional#realJSOP5-Mar-18 1:03 
GeneralRe: That moment when a lot of difficult work becomes a five minute job... Pin
Matthew Dennis4-Mar-18 6:06
sysadminMatthew Dennis4-Mar-18 6:06 
GeneralRe: That moment when a lot of difficult work becomes a five minute job... Pin
Sander Rossel4-Mar-18 6:33
professionalSander Rossel4-Mar-18 6:33 
It's actually more like context.Set<TEntity>().Select(e => new TModel { ... }).ToList();
And now I want to "open up" the selector, not completely replace it (because that will result in quite some duplicated code), but add to it.
I have x TEntity classes that share stuff like Id, Name, Active and even a details table reference, that go nicely into the common selector.
But some also have one or two properties that aren't shared by the others.
Other than those few properties all logic is exactly the same.

I currently have five web pages that use the exact same code in the back-end (save for those few properties) Big Grin | :-D
Took me about twenty to thirty hours to write the first page as abstract as it is and then it took me an hour to add three more and I just spend four hours for the fifth, for which I had to add this Laugh | :laugh:

GeneralRe: That moment when a lot of difficult work becomes a five minute job... Pin
Matthew@Home4-Mar-18 7:29
Matthew@Home4-Mar-18 7:29 
GeneralRe: That moment when a lot of difficult work becomes a five minute job... Pin
Sander Rossel5-Mar-18 6:47
professionalSander Rossel5-Mar-18 6:47 
GeneralRe: That moment when a lot of difficult work becomes a five minute job... Pin
Jörgen Andersson4-Mar-18 21:32
professionalJörgen Andersson4-Mar-18 21:32 
GeneralRe: That moment when a lot of difficult work becomes a five minute job... Pin
Slow Eddie5-Mar-18 2:35
professionalSlow Eddie5-Mar-18 2:35 
GeneralRe: That moment when a lot of difficult work becomes a five minute job... Pin
Sander Rossel5-Mar-18 6:26
professionalSander Rossel5-Mar-18 6:26 
GeneralRe: That moment when a lot of difficult work becomes a five minute job... Pin
Sundance Kid15-Mar-18 0:58
Sundance Kid15-Mar-18 0:58 
GeneralA time-zone question... Pin
Kornfeld Eliyahu Peter3-Mar-18 21:25
professionalKornfeld Eliyahu Peter3-Mar-18 21:25 
JokeRe: A time-zone question... Pin
RickZeeland4-Mar-18 1:16
mveRickZeeland4-Mar-18 1:16 
GeneralRe: A time-zone question... Pin
Kornfeld Eliyahu Peter4-Mar-18 1:32
professionalKornfeld Eliyahu Peter4-Mar-18 1:32 
GeneralRe: A time-zone question... Pin
Richard MacCutchan4-Mar-18 2:06
mveRichard MacCutchan4-Mar-18 2:06 
JokeRe: A time-zone question... Pin
RickZeeland4-Mar-18 2:24
mveRickZeeland4-Mar-18 2:24 
GeneralRe: A time-zone question... Pin
Daniel Pfeffer4-Mar-18 2:28
professionalDaniel Pfeffer4-Mar-18 2:28 
JokeRe: A time-zone question... Pin
RickZeeland4-Mar-18 2:35
mveRickZeeland4-Mar-18 2:35 
GeneralRe: A time-zone question... Pin
Richard MacCutchan4-Mar-18 2:44
mveRichard MacCutchan4-Mar-18 2:44 
JokeRe: A time-zone question... Pin
RickZeeland4-Mar-18 2:48
mveRickZeeland4-Mar-18 2:48 
GeneralRe: A time-zone question... Pin
Richard MacCutchan4-Mar-18 3:20
mveRichard MacCutchan4-Mar-18 3:20 
JokeRe: A time-zone question... Pin
Sander Rossel4-Mar-18 3:33
professionalSander Rossel4-Mar-18 3:33 

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.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   504 votes