I have created a user register controller to register users with repository design pattern. My controller looks like this.
[Route(\"api/[controller]\")]
I had the same error (even with "Content-Type: application/json") but adding "{id}" into the action verb worked for me i.e. changing from
[HttpPatch]
[ActionName("Index")]
[Authorize(Policy = "Model")]
public async Task Update([FromRoute]int id, int modelId, [FromBody]Device device)
to
[HttpPatch("{id}")]
[ActionName("Index")]
[Authorize(Policy = "Model")]
public async Task Update([FromRoute]int id, int modelId, [FromBody]Device device)
(asp.net core 2.1)