Reputation: 760
I have added a new field to the AspNetUsers table for the MVC application using EntityFramework code first model. I can access the field in one of my controllers by doing:
var currentUser = await HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>().FindByIdAsync(User.Identity.GetUserId());
bool isPrivateModeOn = currentUser.IsPrivateMode;
How do I actually set a value (true/false) back to the field in the database? can someone please help? Thanks.
Upvotes: 0
Views: 51