Owin OAuth provider “The entity type IdentityUser is not part of the model for the current context”

十年热恋 提交于 2019-12-04 21:26:14

I suspect the problem is with your connection string. First of all, the constructor of your context only needs to have the name of the connection string, so you can change it to this:

public MyCustomDBEntities() : base("ConnectionStringName") { }

Secondly, this might just be you editing your code before you post, that name needs to match the name in the config file:

<add name="ConnectionStringName" providerName="System.Data.SqlClient" connectionString="...." />

Finally, you likely need to change your connection string to use standard SQL Server format and not EF format. So it will probably look something like this:

Data Source=LNODA-PC;Initial Catalog=Dashboard;Persist Security Info=True;User Id=XXXX;Password=XXXXXX;MultipleActiveResultSets=True;
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!