默认情况下,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="data source=MYPC\SQLEXPRESS;initial catalog=mydb;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" 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项目模板.