SQL Metal 到 dbml,如何生成正确的外键列名称
我有这 2 个表
表名称:Person 列:PersonID, Name
表名称:VisitInfo 列:VisitPersonID , CoordinatorPersonID< /strong>
两列都有一个到 person 表的外键
当我生成代码时,我得到一个具有以下属性的 VisitInfo 类:
- Person
- CoordinatorPerson
但我想要的是具有以下属性的 VisitInfoClass:
- VisitPerson
- CoordiniatorPerson
当生成代码文件时,sql metal开始仅引用同一表的第二个外键的列名称。
有什么想法吗?
I have this 2 tables
table name: Person with Columns:PersonID, Name
table name: VisitInfo with Columns: VisitPersonID , CoordinatorPersonID
both columns have a foreign key to person table
When i generate the code i get a VisitInfo class with the properties:
- Person
- CoordinatorPerson
But what i want is a VisitInfoClass with the following properties:
- VisitPerson
- CoordiniatorPerson
When generating the code file, sql metal begins to refer to the collumn name only for the second foreign key to the same table.
any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
会:
VisitInfo.PersonByVisitPersonID
VisitInfo.PersonByCoordinatorPersonID
...更接近你想要的吗?
如果是这样,我的 L2S 加载项可以选择使用上面的导航属性命名样式...
您可以从 http://www.huagati.com/dbmltools/
Would:
VisitInfo.PersonByVisitPersonID
VisitInfo.PersonByCoordinatorPersonID
...be any closer to what you want?
If so, my add-in for L2S has an option to use the navigation property naming style above...
You can download it from http://www.huagati.com/dbmltools/