我正在使用 MVC 4,并且正在尝试向名为 AdditionalById 的 UserProfile 添加一个新字段(用于管理事务)。
这是我所拥有的:
WebSecurity.CreateUserAndAccount(model.UserName, model.Password, new
{
FirstName = model.FirstName,
LastName = model.LastName,
AddedDate = DateTime.UtcNow
AddedByID = // to sure how to get the id because the account has not been created yet.
});
创建帐户后我应该只更新 AddById 吗?