Click here to Skip to main content
15,915,869 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: Happy birthday... Pin
CPallini30-Mar-19 10:55
mveCPallini30-Mar-19 10:55 
GeneralRe: Happy birthday... Pin
RickZeeland30-Mar-19 11:07
mveRickZeeland30-Mar-19 11:07 
QuestionRe: Happy birthday... Pin
CPallini30-Mar-19 11:25
mveCPallini30-Mar-19 11:25 
AnswerRe: Happy birthday... Pin
RickZeeland30-Mar-19 12:30
mveRickZeeland30-Mar-19 12:30 
GeneralRe: Happy birthday... Pin
CPallini31-Mar-19 0:04
mveCPallini31-Mar-19 0:04 
GeneralRe: Happy birthday... Pin
RickZeeland31-Mar-19 1:13
mveRickZeeland31-Mar-19 1:13 
GeneralRe: Happy birthday... Pin
CPallini31-Mar-19 2:45
mveCPallini31-Mar-19 2:45 
GeneralGod I hate EF6... Pin
#realJSOP30-Mar-19 6:16
professional#realJSOP30-Mar-19 6:16 
0) Use ADO.Net Data Entity Model because EF6 is NOT stored proc friendly when creating models.

1) Create a model so we can use existing stored procs. Surprise! ADODEM doesn't know how to create a model when you return a dataset selected from a temp table (or dynamic sql), or a stored proc with invalid sql, and doesn't even give you the courtesy of telling you these problems exist. It simply doesn't create an entity and lets you figure out what's missing and why it wasn't picked up. Our existing databases have HUNDREDS - maybe even THOUSANDS - of stored procs, and it's impossible to know what's missing without a tedious comparison between what we expected and what we got back.

2) Once a stored proc or table is imported into your model, ADODEM will not make it available for importing into the same moel. That's all well and good, but...

3) ADODEM does NOT update the model correctly. If you change a stored proc, and try to "update from database", it doesn't detect the changes in the returned dataset. If you delete the resulting entity, and try it again, it doesn't see the stored proc because (I think) the dbcontext already has an entry for it. If you delete bith the dbcontext method and the entity, and then re-add the stored proc, it adds an incrementing number to the end of the entity name.

4) If you annotate the properties of a generated entity, and then for whatever reason decide you need to update that entity, kiss your annotations goodbye.

There are more issues I've discovered, but you guys' attention spans are alarmingly short, so, my only recourse is to

0) Allow ADODEM to fail at being a productive tool. At this point, it saves a little time because I don't have to generate the initial models by hand.

1) Create a ViewModel version of ever ADODEM-generated entity so I can implement annotations.

2) Write a method that will use reflection to move data from the model to the viewmodel entity.

3) Hope/pray that the models only need to be created and not updated, because I think it would be easier to manually update the models that to update them with the built-in functionality.

Voyages of discovery aren't nearly as fun when they expose flaws in the matrix.
".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: God I hate EF6... Pin
F-ES Sitecore30-Mar-19 7:38
professionalF-ES Sitecore30-Mar-19 7:38 
GeneralRe: God I hate EF6... Pin
#realJSOP30-Mar-19 7:44
professional#realJSOP30-Mar-19 7:44 
GeneralRe: God I hate EF6... Pin
F-ES Sitecore30-Mar-19 9:34
professionalF-ES Sitecore30-Mar-19 9:34 
GeneralRe: God I hate EF6... Pin
#realJSOP30-Mar-19 10:24
professional#realJSOP30-Mar-19 10:24 
GeneralRe: God I hate EF6... Pin
RickZeeland30-Mar-19 8:02
mveRickZeeland30-Mar-19 8:02 
GeneralRe: God I hate EF6... Pin
#realJSOP30-Mar-19 10:24
professional#realJSOP30-Mar-19 10:24 
GeneralRe: God I hate EF6... Pin
RickZeeland30-Mar-19 10:38
mveRickZeeland30-Mar-19 10:38 
GeneralRe: God I hate EF6... Pin
RickZeeland30-Mar-19 10:55
mveRickZeeland30-Mar-19 10:55 
JokeTwo ants ... Pin
OriginalGriff30-Mar-19 6:07
mveOriginalGriff30-Mar-19 6:07 
GeneralRe: Two ants ... Pin
RickZeeland30-Mar-19 8:07
mveRickZeeland30-Mar-19 8:07 
RantWhy Azure completely totally sucks today (and yesterday) Pin
Sander Rossel30-Mar-19 4:13
professionalSander Rossel30-Mar-19 4:13 
GeneralRe: Why Azure completely totally sucks today (and yesterday) Pin
lopatir30-Mar-19 4:27
lopatir30-Mar-19 4:27 
GeneralRe: Why Azure completely totally sucks today (and yesterday) [FIXED IT!!!] Pin
Sander Rossel30-Mar-19 4:58
professionalSander Rossel30-Mar-19 4:58 
GeneralRe: Why Azure completely totally sucks today (and yesterday) Pin
RickZeeland31-Mar-19 1:05
mveRickZeeland31-Mar-19 1:05 
QuestionMeteorite book for kids ? Pin
virang_2129-Mar-19 22:37
virang_2129-Mar-19 22:37 
AnswerRe: Meteorite book for kids ? Pin
OriginalGriff29-Mar-19 22:54
mveOriginalGriff29-Mar-19 22:54 
GeneralRe: Meteorite book for kids ? Pin
DRHuff30-Mar-19 5:34
DRHuff30-Mar-19 5:34 

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.