ASP .NET CORE 5-单个帐户 - 用户类在哪里?

发布于 2025-02-13 22:02:52 字数 326 浏览 0 评论 0原文

我正在.NET Core 5中开发一个MVC应用程序(这是基于在线点击的RPG)。我决定在开始时选择各个帐户的账户。 我已经更改了访问初始aspnetuser表以具有另一个表的外键(我希望用户具有链接到它的字符)。 现在,我的视图需要根据登录的用户具有或没有字符的用户进行更改。我知道我必须使用Seme的ViewModel。但是问题在于,我无法访问Aspnetuser表的原始类。只是在代码中找不到。我认为该类不存在,Visual Studio只是为我的数据库提供了一个提示来创建这些表。但是我需要这样的班级才能继续进行编码。 您建议我现在做什么? 有没有办法使Visual Studio从表中创建必要的类? 谢谢你,祝你有个盛大的一天。

I am developing an mvc app in .net core 5 (it is an online click-based rpg). I have decided to choose individual accounts athutentication at the start.
I have alter-tabled the initial AspNetUser table to have a foreign key of another table (I want a user to have a character linked to it).
Now I have a view which needs altering based upon logged in user having or not having a character. I know I have to go with seme kind of viewmodel. But the problem is that I have no access to the original class which the AspNetUser table was maped from. It is just not be found in the code. I assume the class does not exist and Visual Studio just gave a cue to my database to create those tables. But I need such class to exist in order to carry on with my coding.
What would you suggest I do now please?
Is there a way to make Visual Studio create necessary classes from the tables?
Thank you and have a grand day.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文