I have found two fairly comprehensive articles detailing how to implement Identity services like IUserStore<,>
, and am nearly done with them, e.g. where I have a:
public class QsaasUserStore<TLogin> : IUserStore<QsaasUser<TLogin>, int> where TLogin : QsaasUserLogin<int>
Now what is bothering me, is how to I tell Identity to use QsaasUserStore<TLogin>
when it needs a user store? Do I need to implement method overrides, or can I use Unity to provide my user store whenever Identity needs an IUserStore
?
Look on the constructors of UserManager
and RoleManager
. UserManager
takes dependency on IUserStore
in constructor. So whatever way you create your UserManager
, provide your implementation of IUserStore
in the constructor.
Same goes for RoleManager
- provide your implementation of IRoleStore
in the constructor and you are done.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments