나는 Asp.net Identity를 사용한다. AspnetUserLogins 테이블에 몇 가지 추가 열을 추가하고 싶습니다 (Firstname, Lastname 열).Asp.net Identity, IdentityUserLogins 클래스의 상속
ExternalLoginInfo eInfo = Context.GetOwinContext().Authentication.GetExternalLoginInfo();
var manager = Context.GetOwinContext().GetUserManager<ApplicationUserManager>();
IdentityResult result = manager.AddLogin(this.User.Identity.GetUserId(), eInfo.Login);`
모든 것이 잘 작동 : 그하기 위해 나는 UserManager 클래스,이 방법에 의해 특정 사용자에게 외부 로그인을 추가하는 기능을 사용하여 응용 프로그램에서
public class ApplicationUserLogin : IdentityUserLogin
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
같은 클래스 IdentityUserLogins
을 물려 받았다. 이 코드는 AspnetUserLogins
테이블에 새 레코드를 추가하고 불행히도 값을 Discriminator
컬럼에 삽입하십시오. UserManager<ApplicationUser>
클래스는 서브 클래스 ApplicationUserLogin
대신 IdentityUserLogin
를 사용 (및 "ApplicationUserLogin"
값으로 판별 자 컬럼을 채우기 위해 말을하는 방법을있는 posibility이 있습니까?