EDMX中导航属性命名约定的问题

编程入门 行业动态 更新时间:2024-10-26 03:28:49
本文介绍了EDMX中导航属性命名约定的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的外键名称是

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中导航属性命名约定的问题

本文发布于:2023-11-12 00:58:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580049.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:属性   EDMX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!