title: Use Custom Class Instead of ApplicationUser In WebApi
body: <p>In My Project I'm Using Repository pattern, So I Want to use my <strong>Own class</strong> instead of <code>ApplicationUser</code> Class.</p>
  
  <p>So I have Customize the <code>DbContext</code> Class accordingly.</p>
  
  <p>This is my class which I want to use in place of ApplicationUser.</p>
  
  <pre><code>public class AppUser : IdentityUser
      {
          public string FirstName { get; set; }
  
          public string LastName { get; set; }
  
          public string Email { get; set; }
  
          public string ConfirmationCode { get; set; }
  
          public DateTime ConfirmationCodeSentDate { get; set; }
  
          [Key]
          public int Identifier {get;set;}
  
          public DateTime DateCreated  { get; set; }
  
          public DateTime LastModified {get; set;}
  
          public bool IsRemoved {   get;  set;}
      }
  </code></pre>
  
  <p>My Context Class is as follow.</p>
  
  <pre><code>public class TestArchDbContext : IdentityDbContext&lt;AppUser&gt;
      {
          public TestArchDbContext()
              : base("TestArchDb")
          {
  
          }
          public IDbSet&lt;Result&gt; Results { get; set; }
          public static TestArchDbContext Create()    
          {
              return new TestArchDbContext();
          }
      }
  </code></pre>
  
  <p>Now There is code in <code>GetExternalLogin</code> Method in AccountController</p>
  
  <pre><code> AppUser user = await UserManager.FindAsync(new UserLoginInfo(externalLogin.LoginProvider,
                  externalLogin.ProviderKey));
  
   ClaimsIdentity oAuthIdentity = await user.GenerateUserIdentityAsync(UserManager,
                      OAuthDefaults.AuthenticationType);
                  ClaimsIdentity cookieIdentity = await user.GenerateUserIdentityAsync(UserManager,
                      CookieAuthenticationDefaults.AuthenticationType);
  </code></pre>
  
  <blockquote>
    <p>I'm getting error that AppUser doesn't contain the defination of
    <code>GenerateUserIdentityAsync</code>.</p>
  </blockquote>
  
  <p>Where do I have to write this method. </p>