当 Visual Studio 自动生成 dbml 文件时,我得到了表中出现的确切字段名称。
但是,由于VS不提供dbml的刷新功能,因此我手动运行sqlmetal来重新创建dbml文件。它工作得很好,但有一个例外——sqlmetal“更正”名称
ses_Id -> Ses_Id
aga_Id -> Aga_Id
等等——它可能会将camelCase更改为CamelCase。
Sqlmetal 帮助没有列出任何保持字段名称不变的开关(只有复数开关)。那么,有谁知道保持字段名称大小写的隐藏开关吗?
先感谢您。
已解决
没有这样的开关,并且 MS 收到了有关该问题的通知 - 添加此类功能的愿望报告(因为它会导致更新项目出现问题)已被关闭,因为不会修复:-(
When dbml file is generated automatically by Visual Studio I get the exact field names as they appeared in the tables.
However, since VS does not provide refresh function for dbml, I run sqlmetal manually to re-create dbml file. It works fine with one exception -- sqlmetal "corrects" the names
ses_Id -> Ses_Id
aga_Id -> Aga_Id
and so on -- it probably changes camelCase to CamelCase.
Sqlmetal help does not list any switch to keep field names as-is (there is only pluralize switch). So, does anyone know the hidden switch to keep the case of field name?
Thank you in advance.
SOLVED
There is no such switch, and MS was notified about the problem -- the wish report to add such feature (because it casuses problem with updating project) was closed as wontfix :-(
发布评论
评论(1)
我怀疑是不是有隐藏开关。我遇到了同样的问题,所以我编写了一个简单的 Perl 脚本来解决它:
只需将所有内容保存到 fdbml.pl,确保安装了 ActiveState Perl,然后在 DBML 文件上运行它:
Ben
I doubt there is a hidden switch. I had the same problem, so I wrote a simple Perl script to sort it out:
Just save all that to fdbml.pl, make sure you have ActiveState Perl installed, then run this on your DBML file:
Ben