dependency injection example for Identity 2.1 alpha 1

Jul 8, 2014 at 6:08 AM
Is there an example of using unity or another IoC with Identity 2.1 alpha 1? I'm quite confused on what all i need to register or alter in order to make my application work.
Jul 11, 2014 at 3:20 PM
I changed TKEY type to long for id in AdentityUser model and i just add one line in UnityConfig class => RegisterComponents and then it worked for me
container.RegisterType<IUserStore<ApplicationUser, long>, MyUserStore>();
if you didn't change type then you can write
container.RegisterType<IUserStore<ApplicationUser>, UserStore<ApplicationUser>>();
because in UserManager need to inject IUserStore.
Jul 11, 2014 at 5:23 PM
this works for 2.0, but in 2.1 there is now an additional argument passed in to the account controller for ApplicationSignInManager. This class relies on IOwinContext. I'm not even sure if i should be worried about this class.