WebApiCompatShim - how to configure for a REST api with MVC 6

前端 未结 2 549
甜味超标
甜味超标 2021-01-22 00:35

I was having a look at this link that shows how to migrate from Web API 2 to MVC 6.

I am trying to have Action methods in my controllers with the HttpRequestMessag

2条回答
  •  再見小時候
    2021-01-22 00:55

    I found that to use the Microsoft.AspNetCore.Mvc.WebApiCompatShim, it should be services.AddMvc().AddWebApiConventions() see this example instead of services.AddWebApiConventions() as shown in the docs.

    I'm putting in a feedback item on their docs.

提交回复
热议问题