title: "Context cannot be used while the model is being created" exception with ASP.NET Identity
body: <p>Why is this happening when we make a call to the AccountApiController.Register() method?</p>
  
  <ul>
  <li>what is trying to use the context? </li>
  <li>what is trying to create the context? </li>
  <li>how do we avoid this? </li>
  <li>how do we debug this? </li>
  </ul>
  
  <blockquote>
    <p>"Message":"An error has occurred.",</p>
    
    <p>"ExceptionMessage":"The context cannot be used while the model is
    being created. This exception may be thrown if the context is used
    inside the OnModelCreating method or if the same context instance is
    accessed by multiple threads concurrently. Note that instance members
    of DbContext and related classes are not guaranteed to be thread
    safe.",</p>
    
    <p>"ExceptionType":"System.InvalidOperationException",</p>
    
    <p>"StackTrace":"    </p>
    
    <p>at System.Web.Http.ApiController.d__1.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown</p>
    
    <p>at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)</p>
    
    <p>at System.Runtime.CompilerServices.TaskAwaiter
    .HandleNonSuccessAndDebuggerNotification(Task > task) </p>
    
    <p>at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__0.MoveNext()"</p>
  </blockquote>