我的外键名称是
FK_Employee_Departmemt_Source FK_Employee_Departmemt_Status
FK_Employee_Departmemt_Source FK_Employee_Departmemt_Status
但是当我添加EDMX中的员工和部门表,实体框架自动将其名称更改为
but when i add Employee and Department table in EDMX, Entity Framework automatically change their names to
部门 Department1
Department Department1
我希望它保持不变,请帮助。
I want it to be remain the same, Kindly help.
谢谢
推荐答案您希望它保持 FK_Employee_Departmemt_Status ?您应该真正阅读有关.NET中命名约定的内容。没关系,因为我知道你不能改变这种行为,你必须在从数据库更新后手动修改名称。此外,在这种情况下,您将有一个重大变化,您将在每次更新包含该FK的实体后执行此操作。
You want it to remain FK_Employee_Departmemt_Status? You should really read something about naming conventions in .NET. Never mind as I know you cannot change this behavior and you must modify names manually after updating from database. Moreover in this case you have a big change you will have to do it after each update of the entity containing that FK.
更多推荐
EDMX中导航属性命名约定的问题
发布评论