I added a custom field to the UserProfile
table named ClassOfYear
and I'm able to get the data into the profile during registration like this:
var confirmationToken = WebSecurity.CreateUserAndAccount(model.UserName,
model.Password,
propertyValues: new { ClassOfYear = model.ClassOfYear },
requireConfirmationToken: true);
However, now I want to be able to update the profile when I manage it but I can't seem to find a method to do so. Do I need to simply update the UserProfile
table myself? If not, what is the appropriate way of doing this?
FYI, I'm using Dapper as my data access layer, just in case it matters. But, like stated, I can just update the UserProfile
table via Dapper if that's what I'm supposed to do, I just figured that the WebSecurity
class, or something similar, had a way already since the custom user profile fields are integrated with the CreateUserAndAccount
method.
Thanks all!