views:

154

answers:

2

Is it possible to refresh only one entity in entity framework designer? Every time I refresh model from database, it refreshes all entities. The problem is that this mechanism doesn't recognize properly primary keys in views, so I have to correct it manually. Am I missing something?

A: 

I can't tell you if you can or can't do it, but I have one clue how to figure it out. http://code.msdn.microsoft.com/EdmGen2

EdmGen2 contains source code and dll probably with functionalities from usual EdmGen. Unfortunately I didn't have time to investigate this further. Hope this helps.

kubal5003
+1  A: 

No, you're not missing anything. When you update model using the GUI designer, the entire storage schema is regenerated. At least, that's how it works in Entity Framework 1.

Craig Stuntz
CTP versions seemed to have this functionality (http://tinyurl.com/yfxuczo). This is huge flaw, specially in bigger models. I hope they will implement it in EF4 designer.
LukLed
You should consider filing a connect report, then. That said, EF 4 does have other ways of customizing your model. You might consider code-only, given what you're doing.
Craig Stuntz
I like GUI designer. It does its job well, but has some flaws. When corrected, I'll need nothing more.
LukLed
In EF 4 you could consider model-first, then.
Craig Stuntz