相关疑难解决方法(0)

将ASP.NET标识存储库移动到EF Sql数据库

默认情况下,ASP.NET Identity用户数据存储在mdf文件中.

我想将数据存储在Sql数据库中,以便将my中的defaultconnection字符串更改为web.config基于EF的连接:

 <add name="DefaultConnection" connectionString="metadata=res://*/Models.StartifyModel.csdl|res://*/Models.StartifyModel.ssdl|res://*/Models.StartifyModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=MYPC\SQLEXPRESS;initial catalog=mydb;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
Run Code Online (Sandbox Code Playgroud)

现在The entity type ApplicationUser is not part of the model for the current context.,只要我想注册用户,我就会收到错误.

我使用VS2013的默认MVC5项目模板.

sql asp.net asp.net-mvc entity-framework asp.net-identity

4
推荐指数
1
解决办法
3330
查看次数