Security Identity如何知道如何使用其核心接口的自定义实现?

Security Identity如何知道如何使用其核心接口的自定义实现?,security,authentication,asp.net-web-api,asp.net-identity,Security,Authentication,Asp.net Web Api,Asp.net Identity,我已经找到了两篇相当全面的文章,详细介绍了如何实现身份服务,如IUserStore,并且已经差不多完成了,例如,我在哪里有: public class QsaasUserStore<TLogin> : IUserStore<QsaasUser<TLogin>, int> where TLogin : QsaasUserLogin<int> 公共类QsaasUserStore:IUserStore,其中TLogin:QsaasUserLogin

我已经找到了两篇相当全面的文章,详细介绍了如何实现身份服务,如
IUserStore
,并且已经差不多完成了,例如,我在哪里有:

public class QsaasUserStore<TLogin> : IUserStore<QsaasUser<TLogin>, int> where TLogin : QsaasUserLogin<int>
公共类QsaasUserStore:IUserStore,其中TLogin:QsaasUserLogin
现在困扰我的是,我如何告诉Identity在需要用户存储时使用
QsaasUserStore
?我是否需要实现方法重写,或者我是否可以在Identity需要
IUserStore
时使用Unity提供我的用户存储?

查看
UserManager
RoleManager
的。
UserManager
依赖于构造函数中的
IUserStore
。因此,无论您以何种方式创建
UserManager
,请在构造函数中提供
IUserStore
的实现

rolemanger
-在构造函数中提供
IRoleStore
的实现,就完成了