Scaffolding controller doesn't work with visual studio 2013 update 3 and 4

前端 未结 11 1505
慢半拍i
慢半拍i 2020-12-23 19:53

Im unable to scaffold a controller (MVC5 Controller with views, using Entity Framework) in Visual studio 2013 (update 3 and 4). The error message is below:

There was

11条回答
  •  春和景丽
    2020-12-23 20:40

    None of answers of this post worked for me. I handled this issue creating new context class through plus button in Add Controller scaffolding dialog. Once VS created controller and views, I just remove the created context class and change the the generated controller code to use my existing context class.

    Important: This process will add a new connection string for the new context, dont forget to remove it as well.

提交回复
热议问题