构建时自动更改 Visual Studio 源代码(更新 DBML 等)

发布于 2024-09-08 23:01:42 字数 105 浏览 2 评论 0原文

每次我通过 DBML 重建时,我都必须调整各个字段的自动生成值等设置。

是否有内置工具可用于在构建时自动执行 DBML 中的更改?我正在使用 Visual Studio 2008。

Every time I rebuild by DBML, I have to adjust settings for auto generated value etc. for individual fields.

Is there a built-in tool which I could use to automate my changes in the DBML when I build? I'm using Visual Studio 2008.

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

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

发布评论

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

评论(1

歌入人心 2024-09-15 23:01:42

我没有发现任何内置的东西。我只是使用 T4 模板来读取构建时的数据库并使用新列和数据类型更改更新 DBML 文件 - 没有其他。这样,一旦将表放入 DBML 文件中,您就无需担心丢失自定义设置。这很痛苦,但却是一个简单可行的解决方案。尽管我很想知道是否有人有更好的(并且免费的)想法。

I've not found anything built-in. I just use a T4 template that reads my database on builds and updates the DBML file with new columns and datatype changes - nothing else. That way, once a table is place on the DBML file, you never need to worry about losing your customizations. It's a pain, but a simple workable solution. Though I'd love to know if someone has a better (and free-as-in-$$$) idea.

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