SQL Metal 到 dbml,如何生成正确的外键列名称

发布于 2024-08-17 14:35:00 字数 485 浏览 9 评论 0原文

我有这 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜心小果奶 2024-08-24 14:35:00

会:
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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文