title: How do I delete a user with a role in ASP.NET MVC4 SimpleMembership?
body: <p>Thanks for looking.</p>
  <h1>Background</h1>
  <p>On my current project, the client would like me to use ASP.NET MVC4's Simple membership.  Normally I do not use the .NET membership classes so perhaps I am missing something simple, but I can't seem to delete a user through code as there is a foreign key constraint between the <code>webpages_UsersInRoles</code> table and the <code>UserProfile</code> table.</p>
  <p>I have tried using <code>Membership.DeleteUser(id, true);</code> since the setting of 'true' should cascade the delete, but even that fails if there is a role assigned to the user.</p>
  <p>I have tried going into the <code>mdb</code> file through the server explorer and setting the delete action on the FK's to <code>CASCADE</code> but the option for delete action is disabled.</p>
  <p>As a last-ditch effort, I created a separate entity class (.edmx) from the membership database in hopes that I could hack my way to a successful delete through C#, but the generation of the .edmx refuses to bring in the <code>webpages_UsersInRoles</code> table!</p>
  <p>I am using C#, .NET 4.5.</p>
  <h1>Question</h1>
  <p>Using C#. how do I delete a user from MVC4 SimpleMembership if that user has been assigned one or more roles?</p>