我有表UserProfile
,在那裏我有一些附加字段,如電子郵件,typeAccount,isActivated等
當我Membership.GetUser().(..)
,我沒有這些字段。
如何解決它?以及如何改變這個領域的價值?附加字段MVC
[Table("UserProfile")]
public class UserProfile
{
[Key]
[DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
public int UserId { get; set; }
public string UserName { get; set; }
public string Email { get; set; }
public int typeAccount { get; set; }
public bool activated { get; set; }
public string activationcode { get; set; }
public bool del { get; set; }
}
問候
您是否添加了成員資格提供程序表? – 2013-03-11 12:30:23
我使用本教程 - http://blog.longle.net/2012/09/25/seeding-users-and-roles-with-mvc4-simplemembershipprovider-simpleroleprovider-ef5-codefirst-and-custom-user-properties/ – whoah 2013-03-11 12:31:53
你應該接受Darin的回答! – ssilas777 2013-03-11 13:19:57