问题
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