|
I hate April 1st... Nothing on the internet is believable.
".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
|
|
|
|
|
And I have a meeting tomorrow with the most laziest of our customer (government related)... I hope it will not turn in to a 1st of April joke...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
|
|
|
|
|
#realJSOP wrote: Nothing on the internet is believable.
Yup. George Washington was of the same opinion.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
|
Lemon?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
SULKY ?
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
|
|
|
SAK sounds a bit unpleasant, like he was fired.
On the other hand SA does not sound too pleasant either (if you know something about WWII).
So maybe we should stick to: Happy Birthday K!
|
|
|
|
|
RickZeeland wrote: SAK sounds a bit unpleasant, like he was fired.
I simply don't care about and stick to: Happy Birthday SAK.
|
|
|
|
|
Quote: sono un italiano
Buongiorno Italia
gli spaghetti al dente
e un partigiano come Presidente
|
|
|
|
|
Wow, Cotugno no less! You know, we had Verdi, Rossini, and the like.
Still what has it to do with SAK?
|
|
|
|
|
Nothing to do with SAK, just being a bit italianesque. I was under the impression that I heard that song from Adriano Celentano first, but after some Googling I found out that although the song was written for him, he turned it down. Oh, those Italians when will they ever learn, mamma mia
|
|
|
|
|
Quote: just being a bit italianesque
Ah, stereotyping. Brilliant, indeed.
|
|
|
|
|
Now, now, don't take it too personally, you can't help it being born in that country
|
|
|
|
|
Brilliance again. I'm dazzled.
|
|
|
|
|
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
|
|
|
|
|
EF isn't intended for use with SPs. If you have a thousand pre-written SPs and insist on working with them then you're using the wrong technology, that's not the fault of EF, use ado.net instead.
As for updating the auto-generated classes, again you're not supposed to. They are marked as partial so any edits you want to do can be done on your own partial class that you have to create yourself.
|
|
|
|
|
You can't annotate properties in partial classes. Being partial is pointless in that regard. Now, if they made all the entity properties virtual, I could just inherit the generated entity and override the properties with annotations. That would be a billion times more useful.
".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 30-Mar-19 13:53pm.
|
|
|
|
|
|
Thanks, I didn't know about that. I'll give it a shot. (But EF6 still sucks today.)
".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
|
|
|
|
|
NHibernate is the name of the shining magic bullet that will make all your pain go away, he he
|
|
|
|
|
We can't use nHibernate - it's not on the ASL.
".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
|
|
|
|
|