Link ASP.NET Identity users to user detail table

后端 未结 5 2116
旧巷少年郎
旧巷少年郎 2020-12-29 16:46

I\'ve used default MVC template with individual authorization. After running the application it automatically creates the required Identity tables. I\'ve successfully regist

5条回答
  •  被撕碎了的回忆
    2020-12-29 17:13

    var manager = new UserManager(new UserStore(new ApplicationDbContext()));
    var store = new UserStore(new ApplicationDbContext());
    var ctx = store.Context;
    var currentUser = manager.FindById(User.Identity.GetUserId());  
    pedido.Nombre = currentUser.Nombre;
    

提交回复
热议问题