All identities of entities in model have name "EntityNameId". How I can rename all identity to "Id"?
+1
A:
Two way I can think of
- manually in EF designer
- manually editing EDMX XML file by using some regular expression replace
The first one is safe, the second one is tricky because you only have to rename some of them. SSDL should stay as it is and mapping should only rename entity IDs.
If you have something like up to 50 entities, I suggest you rename them in designer manually. It's safe and it shouldn't take too much time (unless you've written a lot of EF code that uses these already).
Robert Koritnik
2010-10-05 12:26:22
In addition, if you already have used the "EntityNameId" properties a lot, I would perform a rename/refactoring on the generated class first before changing the name in the designer.
Fabiano
2010-10-05 12:52:54