Global rename identity for enity
All identities of entities in model have name "EntityNameId". How I can rename all identi开发者_开发百科ty to "Id"?
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).
精彩评论