如何在Visual Studio 2022和EF 6中使用EF设计师?

发布于 2025-02-03 08:14:52 字数 262 浏览 6 评论 0原文

两者的最新稳定。

我已经成功地进行了脚手架然后迁移(将Aspnetuser表放到数据库中)。工作策略是数据库优先。该解决方案由Web应用程序和Worker Service项目使用文件夹中的共享模型组成,这效果很好。

现在,我已经对表进行了更改,并希望更新模型。显然,迁移与我想要的相反,如果我脚手架,我可能会覆盖自己的添加(例如,构造,二手服务等) - 这是正确的吗?

EF设计师似乎会让我这样做,但是我找不到如何在许多问题答案中打开EF设计师。

这些

Latest stable for both.

I've successfully scaffolded and then migrated (to get ASPNetUser tables over to the database). Work policy is Database-First. The solution consists of web app and worker service projects using shared models in a Folder and this works well.

Now I've made changes to the tables, and would like to update the models. Obviously migrating is the opposite of what I want, and if I scaffold I may overwrite our own additions (to e.g. OnConfiguration, used services, etc) - is this correct?

It seems EF Designer will let me do this, but I'm not able to find how to even open the EF Designer shown in many answers to the question.

Do these release notes (see "EF Designer Support") suggest that it's deprecated, and is the workaround recommended?

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

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

发布评论

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

评论(1

风追烟花雨 2025-02-10 08:14:52

对任何更改都使用部分类/方法,因此它们不会被覆盖,然后使用

-Force 

(或查看EF核心电动工具),

EF Core没有“ EF Designer”

Use partial classes/methods for any changes, so they do not get overwritten, and then use

-Force 

(or have a look at EF Core Power Tools)

There is no "EF designer" for EF Core

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