C# 如何在AspNetUsers表中保存字段
我使用EntityFramework代码优先模型为MVC应用程序的AspNetUsers表添加了一个新字段。我可以通过以下操作访问我的一个控制器中的字段:C# 如何在AspNetUsers表中保存字段,c#,model-view-controller,C#,Model View Controller,我使用EntityFramework代码优先模型为MVC应用程序的AspNetUsers表添加了一个新字段。我可以通过以下操作访问我的一个控制器中的字段: var currentUser = await HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>().FindByIdAsync(User.Identity.GetUserId()); bool isPrivateModeOn = curre
var currentUser = await HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>().FindByIdAsync(User.Identity.GetUserId());
bool isPrivateModeOn = currentUser.IsPrivateMode;
var currentUser=wait HttpContext.GetOwinContext().GetUserManager().FindByIdAsync(User.Identity.GetUserId());
bool isPrivateModeOn=currentUser.IsPrivateMode;
如何将值(真/假)设置回数据库中的字段?有人能帮忙吗?谢谢。你可以用它来更新用户属性。至关重要的是,太棒了。非常感谢。