使用.Net 4.6程序集中的Identity Framework 3.0

时间:2016-01-06 10:08:12

标签: asp.net-core asp.net-identity-3

我正在尝试使用ASP.Net 5中的新Identity Framework 3(3.0.0-rc1)从.Net 4.6应用程序创建和修改用户和角色。

从寻找答案时我能找到的内容应该是这样简单:
var roleManager = new RoleManager<IdentityRole>(new RoleStore<IdentityRole>(destination));

但是RoleManager构造函数需要6个参数:
public RoleManager(IRoleStore<TRole> store, IEnumerable<IRoleValidator<TRole>> roleValidators, ILookupNormalizer keyNormalizer, IdentityErrorDescriber errors, ILogger<RoleManager<TRole>> logger, IHttpContextAccessor contextAccessor);

ASP.Net 5使用IoC提供UserManager和RoleManager,它似乎与服务器的设置密切相关。

如何从.Net 4.6程序集修改Identity Framework 3用户和角色?

0 个答案:

没有答案