2016-08-24 103 views

回答

1
var store = new UserStore<ApplicationUser>(new ApplicationDbContext()); 
ApplicationUserManager _userManager = new ApplicationUserManager(store); 
var manger = _userManager ?? HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>(); 
var user = new ApplicationUser() { Email = aspNetUsers.Email, UserName = aspNetUsers.UserName }; 
var usmanger= manger.Create(user, aspNetUsers.PasswordHash); 
相關問題