“Context cannot be used while the model is being created” exception with ASP.NET Identity

后端 未结 7 1303
遥遥无期
遥遥无期 2020-12-01 07:42

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
7条回答
  •  孤独总比滥情好
    2020-12-01 07:47

    In my case, I got this message when I run multi-threading tasks and I follow the solution form EL Vany. His solution is quite good. Now I can run 100x threads at the same time without any exception.

    http://elvanydev.com/EF-DbContextFactory/#comments-1

提交回复
热议问题