The property 'Claims' on type 'AspNetUser' is not a navigation property

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 00:08:30

You can check here properties of IdentityUser: https://msdn.microsoft.com/en-us/library/microsoft.aspnet.identity.entityframework.identityuser_properties(v=vs.108).aspx

As you can see, properties like Claims, Logins, Roles are already there. By default asp.net identity is using DbContext, which inherits from IdentityDbContext https://msdn.microsoft.com/en-us/library/microsoft.aspnet.identity.entityframework.identitydbcontext%28v=vs.108%29.aspx

This class configure many things like table mappings etc. Can we see your DbContext?

So first, try removing added ICollections and theirs initializers from constructor.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!