Why is this happening when we make a call to the AccountApiController.Register() method?
- what is trying to use the context?
- what is trying to create the context?
- how do we avoid this?
- how do we debug this?
"Message":"An error has occurred.",
"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.",
"ExceptionType":"System.InvalidOperationException",
"StackTrace":"
at System.Web.Http.ApiController.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter .HandleNonSuccessAndDebuggerNotification(Task > task)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__0.MoveNext()"