title: Unknown column 'Extent2.IdentityUser_Id' in 'field list'
body: <p>I got this error message <code>Unknown column 'Extent2.IdentityUser_Id' in 'field list'</code> when I try to customize Application User.</p>
  <p>Full error:</p>
  <blockquote>
  <p>Unknown column <code>Extent2.IdentityUser_Id' in 'field list'</code></p>
  </blockquote>
  <p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.</p>
  <blockquote>
  <p>Exception Details: <code>MySql.Data.MySqlClient.MySqlException: Unknown column 'Extent2.IdentityUser_Id' in 'field list'</code></p>
  <p><code>Line 96: var user = await UserManager.FindByNameAsync(model.UserName);</code></p>
  </blockquote>
  <p>I have existed Mysql db with user table. I can not to use other table. I have to keep MyUser table and I add some table follow Asp.Net Identity definitions:</p>
  <p>In IdentiyModels.cs :</p>
  <pre><code>public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
          {
              public ApplicationDbContext(): base(&quot;KadContext&quot;)
              {
              }
      
              public static ApplicationDbContext Create()
              {
                  return new ApplicationDbContext();
              }
              protected override void OnModelCreating(System.Data.Entity.DbModelBuilder modelBuilder)
              {
                  base.OnModelCreating(modelBuilder);
      
                  modelBuilder.Entity&lt;IdentityUser&gt;().ToTable(&quot;ad_users&quot;).Property(p =&gt; p.Id).HasColumnName(&quot;id&quot;);
                  modelBuilder.Entity&lt;IdentityUser&gt;().ToTable(&quot;ad_users&quot;).Property(p =&gt; p.UserName).HasColumnName(&quot;user_name&quot;);
                  p.PasswordHash).HasColumnName(&quot;user_password&quot;);
                  modelBuilder.Entity&lt;ApplicationUser&gt;().ToTable(&quot;ad_users&quot;).Property(p =&gt; p.Id).HasColumnName(&quot;id&quot;);
                  modelBuilder.Entity&lt;ApplicationUser&gt;().ToTable(&quot;ad_users&quot;).Property(p =&gt; p.UserName).HasColumnName(&quot;user_name&quot;);
                  
                  modelBuilder.Entity&lt;IdentityUserRole&gt;().ToTable(&quot;ad_userroles&quot;);
                  modelBuilder.Entity&lt;IdentityUserLogin&gt;().ToTable(&quot;ad_userlogins&quot;);
                  modelBuilder.Entity&lt;IdentityUserClaim&gt;().ToTable(&quot;ad_userclaims&quot;);
                  modelBuilder.Entity&lt;IdentityRole&gt;().ToTable(&quot;ad_roles&quot;);
              }
          }
  </code></pre>
  <p>I want to hook into OWIN Self Hosting to create Authencation for login features</p>
  <p>In AccountController.cs :</p>
  <pre><code>//
  // POST: /Account/Login
  [HttpPost]
  [AllowAnonymous]
  //[ValidateAntiForgeryToken]
  public async Task&lt;ActionResult&gt; Login(LoginViewModel model, string returnUrl)
  {
      if (!ModelState.IsValid)
      {
          return View(model);
      }
    
      var user = await UserManager.FindByNameAsync(model.UserName);
      var identity = await SignInManager.CreateUserIdentityAsync(user);
      AuthenticationManager.SignIn(identity);
  
      return RedirectToLocal(returnUrl);
  }
  </code></pre>
  <p>I only to use AuthencationManager to manage Authencation after I check user permission from LDAP server. So that I want to hook ASP.NET Identity OWIN on MVC 5 system.</p>
  <p>Does anyone see this error? I need a solution to go through it.</p>
  <hr />
  <p>I found this way I want can not reach . Due to ASP.NET Identity OWIN on MVC 5 System need a sets of tables User, Roles, Claims. If you want to custom them should follow here <a href="http://www.jamessturtevant.com/posts/ASPNET-Identity2.0-Custom-Database/" rel="nofollow noreferrer">http://www.jamessturtevant.com/posts/ASPNET-Identity2.0-Custom-Database/</a></p>
  <ul>
  <li>I also am trying to hook like an external system (ex google, facebook...) .  I think I must create an temp request from external system with full information after request ASP.Identity  OWIN allow create Authentication User.</li>
  </ul>
  <p>Does anyone have full solution for that!?</p>