entity framework - naming of model with same types

筅森魡賤 提交于 2019-12-08 11:55:42

问题


I have 2 tables: Bikes and Wheels. Bike has 2 FKs to Wheels: Bike.FrontWheelID and Bike.BackWheelID. EF maps these onto Bike.Wheel and Bike.Wheel1, just using their type for name, which I would prefer to avoid.

Is there a way to change this that would survive further regenerations of model from db schema? (some setting perhaps?)

Thanks


回答1:


You can rename those properties in Entity Model Designer and it will not affect further regenerations of the model.



来源:https://stackoverflow.com/questions/3360851/entity-framework-naming-of-model-with-same-types

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!