title: SimpleMembership with custom database schema in ASP.NET MVC 4
body: <p>I want to enable the ASP.NET MVC 4's SimpleMembership API to integrate with my own database schema. I have a plain and simple table in my database called <code>Users</code> with these fields:</p>
  
  <ul>
  <li><strong>Id</strong></li>
  <li><strong>Name</strong></li>
  <li><strong>Password</strong></li>
  <li><strong>Email</strong></li>
  <li><strong>IsDeleted</strong></li>
  </ul>
  
  <p>I have already configured the SimpleMembership API to use my database:</p>
  
  <pre><code>WebSecurity.InitializeDatabaseConnection("MyStuff", "Users", "Id", "Name", autoCreateTables: true);
  </code></pre>
  
  <p>And I can insert a user too:</p>
  
  <pre><code>WebSecurity.CreateUserAndAccount(model.UserName, model.Password, 
                                   new 
                                   { 
                                          IsDeleted = false, 
                                          Email = "sampledata@gmail.com"                
                                   });
  </code></pre>
  
  <p>However, the Password field (or it's hash) is not inserted into the Users table (of course), it inserted into another table called <code>webpages_Membership</code> which is created with the <code>InitializeDatabaseConnection</code> call and contains a lot of unnecessary information which I don't need.</p>
  
  <p>Also, I have other automatically created tables called webpages_OAuthMembership, webpages_Roles and webpages_UsersInRoles which I don't need.</p>
  
  <p>I've already tried to set the table generation to false:</p>
  
  <pre><code>WebSecurity.InitializeDatabaseConnection("MyStuff", "Users", "Id", "Name", autoCreateTables: false);
  </code></pre>
  
  <p>But in this case the CreateUserAndAccount call will throw an exception because it will not find the webpages_Membership table.</p>
  
  <p>It looks like these tables needed when I want to use the SimpleMembership API. </p>
  
  <p>My question is that: what should I do in a scenario like this when I want only a simple <code>Users</code> table and nothing more?</p>
  
  <p>Do I have to write the whole membership handling and the authentication logic (hash code generation, etc.) myself?</p>