如何拆分大型 sql metal c# 实体文件

发布于 2024-11-19 05:43:56 字数 148 浏览 6 评论 0原文

我使用 sql metal 为我正在使用的数据库生成 ac# 实体文件。最终结果是一个 6mb 的文件,里面有很多实体类,这需要很长时间才能在 Visual Stuido 中加载。是否可以为每个表/实体生成一个 cs 文件?或者是否有实用程序可以将 cs 文件拆分为多个源代码文件?

I used sql metal to generate a c# entity file for the database that I'm using. The end result is a 6mb file with many entity classes inside, this takes a long time to load up in visual stuido. Is it possible to generate a single cs file per table/entity? Or is there utility that can split up the cs file into multiple source code files?

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

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

发布评论

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

评论(1

攒眉千度 2024-11-26 05:43:56

不是直接答案,而是问题的可能解决方案。

将实体文件移动到其自己的项目中。编译它并仅使用对主项目文件中的程序集输出的引用。因为它是生成的代码,所以您不一定希望它可编辑。

这将允许 IDE 加载已编译的版本,并使一切开发变得更加快捷。

Not a direct answer, but a possible solution to your problem.

Move the entity file into its own project. Compile that and just use the reference to the assembly output in your main project file. Because it's generated code, you don't necessarily want to have it editable anyway.

This will allow the IDE to load the compiled version and make everything a bit snappier for development.

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