I'm trying to use the new
Asp.Net Identity
Register
User Manager
var result = await UserManager.CreateAsync(user, register.Password);
UserManager
Using the generic type 'Microsoft.AspNet.Identity.UserManager<TUser,TKey>' requires 2 type arguments
var result = await UserManager.CreateAsync(user, register.Password);
The UserManager
in the above statement is not a Class
as I've expected. Its a property of type UserManager<ApplicationUser>
.
So, at the beginning just declared a property as
public UserManager<ApplicationUser> UserManager { get; private set; }
And now I can use the Async
version for creating users. The following statement works.
var result = await UserManager.CreateAsync(user, register.Password);