How to configure Web Api 2 to look for Controllers in a separate project? (just like I used to do in Web Api)

前端 未结 8 1807
隐瞒了意图╮
隐瞒了意图╮ 2020-12-04 17:40

I used to place my controllers into a separate Class Library project in Mvc Web Api. I used to add the following line in my web api project\'s global.asax to look for contro

8条回答
  •  悲&欢浪女
    2020-12-04 18:10

    If your class library is built with EF then make sure you have the connection string specified in the App.config for the class library project, AND in the Web.config for your Web API MVC project.

提交回复
热议问题