A key cannot be configured on

 

public class User : IdentityUser
{
}

public class   WebUserRoleEntity: User 
{ }

 

WebUserRoleEntity

A key cannot be configured on 'WebUserRoleEntity' because it is a derived type. The key must be configured on the root type 'UserEntity'. If you did not intend for 'UserEntity' to be included in the model, ensure that it is not referenced by a DbSet property on your context, referenced in a configuration call to ModelBuilder, or referenced from a navigation on a type that is included in the model.

 

 

 

EF报错了。

posted @ 2022-06-29 11:07  纵一苇之所如-  阅读(163)  评论(0编辑  收藏  举报