我是第一次使用 Membership Reboot,我有自定义课程。我添加了一个名为 Middle Name 的新属性。如何对此进行 EF 迁移以使其更新?
public class CustomUser : RelationalUserAccount
{
[Display(Name = "First Name")]
public virtual string FirstName { get; set; }
[Display(Name = "Last Name")]
public virtual string LastName { get; set; }
[Display(Name = "Middle Name")]
public virtual string MiddleName { get; set; }
public virtual int? Age { get; set; }
}
public class CustomUserAccountService : UserAccountService<CustomUser>
{
public CustomUserAccountService(CustomConfig config, CustomUserRepository repo)
: base(config, repo)
{
}
}
public class CustomUserRepository : DbContextUserAccountRepository<CustomDatabase, CustomUser>
{
public CustomUserRepository(CustomDatabase ctx)
: base(ctx)
{
}
}