为什么 DbMetal 生成带有“main”的表属性?

发布于 2024-09-13 09:27:34 字数 376 浏览 4 评论 0原文

我是 DBLink 和 Sqlite 的新手。当 DbMetal 生成 Nortwind.cs (C#) 时,它用 Table 属性标记一些方法:

[Table(Name="main.Categories")]    // C#

在我使用 DbMetal 创建 Nortwind.vb (VB.Net) 文件后,测试程序中止,因为没有名为“main.Categories”的表。然而,当我删除“main.”时,它起作用了:

' VB.Net

<Table(Name:="Categories")> _

我只是不明白为什么会生成“main”。为什么它适用于 C# 而不适用于 VB.Net?

I'm a newbie with DBLink and Sqlite. When DbMetal generates Nortwind.cs (C#) it marks some methods with a Table attribute:

[Table(Name="main.Categories")]    // C#

After I used DbMetal to create a Nortwind.vb (VB.Net) file, the test program aborted because there was no table named "main.Categories". However, when I removed "main.", it works:

' VB.Net

<Table(Name:="Categories")> _

I'm just not understand why "main" is generated at all. Why does it work for C# but not for VB.Net?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

后知后觉 2024-09-20 09:27:34

DbMetal 默认生成“main”。在“生成 .dbml 文件”模式下,可以通过指定 --database 参数来更改它。但是,截至目前,可以使用 --database 更改类名,但它仍然在 Table 属性中写入“main”,因此回到第一个位置,直到它被修复。

http://code.google.com/p/dblinq2007/wiki/DbMetal

DbMetal generates "main" by default. It can be changed by specifying the --database argument when in the "generate .dbml file" mode. However, as of this time, the class name can be changed using --database but it still writes "main" in the Table attribute so back to square one until it's fixed.

http://code.google.com/p/dblinq2007/wiki/DbMetal

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