身份中缺少数据上下文类

发布于 2025-02-08 05:08:33 字数 189 浏览 1 评论 0原文

因此,我有一个ASP Core 3.1项目,并通过EF从SQL Server中设法通过EF进行脚手架。

这些都可以正常工作,并且按照我需要做。 但是,当我使用现有的ASP用户表向项目添加身份时,我找不到脚手架菜单中的数据上下文类。

我已经尝试重新加载身份,更改基础并更改启动文件以查看当前数据库连接,

任何帮助都将不胜感激

So I have a ASP Core 3.1 project and have managed to scaffold out via EF all the rest of my existing tables from my SQL server.

These all work fine and do as i need them to.
However when i go to add Identity to the project using my existing ASP User tables i cannot find the Data context class in the Scaffold menu.

I have already tried re-loading Identity, changing the base, and changing the startup file to look at the current database connection

Any help would be appreciated

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

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

发布评论

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

评论(1

小…楫夜泊 2025-02-15 05:08:33

我遇到了同样的问题。我继承了superclass dbContext 在我的applicationdbcontext中。由于我使用了身份平台,因此将其更改为IdentityDbContext。它解决了我的问题。

I had the same problem. I was inheriting the superclass DbContext in my ApplicationDbContext. Since I was using Identity platform, changed it to IdentityDbContext. It fixed my issue.

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