c# - 非泛型类型“IdentityUser”不能与类型参数一起使用
问题描述
我正在尝试将身份添加到我的 MVC 项目中。我想使用 aint
作为我的密钥而不是string
. 当我尝试以下操作时出现此错误:
public partial class AppUser : Microsoft.AspNet.Identity.EntityFramework.IdentityUser<int>
{
}
是否有我需要执行此操作的库,或者是否缺少我的参数?即使我已经运行脚本来添加所有身份表,我是否需要添加IdentityDbContext
到我的 中?DbContext
如果我删除<int>
我没有得到错误。
解决方案
推荐阅读
- c# - 从节点 js(部署在 aws 上)返回值到 unity
- c++14 - 编译器无法识别重载方法
- intellij-idea - 为什么我的 Intellij IDE 无法正常打开
- java - 为什么 Android 中会出现 Unparseable date 错误?
- node.js - 如何使用节点 js 在 tsv 文件中写入列?
- java - 自定义布局的Android ArrayAdapter问题
- spring - 无法使用 Spring Boot 将 EntityManager 配置为 Transactional
- swift - 斯威夫特:为什么 IBoutlet 没有分配(=)到他们的类型,而是他们只是有一个强制展开类型(!)
- c# - 如何在 C# windows 窗体应用程序中创建形状的平滑动画移动?
- vue.js - Vue - 根据内容更改输入宽度