【发布时间】:2017-08-04 11:27:53
【问题描述】:
我正在学习MVC5身份认证 我有一个现有的数据库,并且 DataContext 取决于该数据库,该数据库具有与 aspnetuser 非常相似的 User 表,并且我还具有 aspnetrol 的角色。我正在尝试将 ASP.NET Identity 集成到我的项目中. 在将身份添加到我的数据库后,我是否应该删除用户、角色表?以及如何将 aspnetuser 连接到我的表???? 这是我添加身份后数据库的图片 enter image description here
我读过How to add ASP.NET MVC5 Identity Authentication to existing database 和 Integrating ASP.NET Identity to existing database
【问题讨论】:
-
您的数据库中不需要 asp 表。相反,您可以将自定义表用于 asp 标识。请参阅下面我的回答中的文章。
-
Click Here 你会找到答案的。
标签: c# asp.net database asp.net-mvc-5