【问题标题】:How to custom user table in MVC 5 using identity?如何使用身份在 MVC 5 中自定义用户表?
【发布时间】:2016-03-31 02:48:42
【问题描述】:

我想在带有自定义表的 MVC 5 中使用身份技术,但我不知道该怎么做。例如,我的 [user] 表是

id primary key identity(1,1),
username  nvarchar(50),
password nvarchar(50),
email varchar(100),
address nvarchar(100)
.... some information

我该怎么办?感谢您的帮助!

【问题讨论】:

标签: c# asp.net-mvc-5 asp.net-identity


【解决方案1】:

终于,我做到了! 如果其他人有像我这样的问题,请阅读一些链接

Trying to change table names in ASP.NET Identity 2.0 http://www.codeproject.com/Articles/796940/Understanding-Using-and-Customizing-ASP-NET-Identi

您需要对模型使用代码优先迁移并使用包控制台命令对其进行更新
update-database .

【讨论】:

    猜你喜欢
    • 2016-03-06
    • 2017-09-14
    • 1970-01-01
    • 2014-11-15
    • 1970-01-01
    • 2014-12-11
    • 2015-10-13
    • 1970-01-01
    • 2015-12-15
    相关资源
    最近更新 更多