Note that you are sending a POST request with parameters in the body. That means that the URl you are posting to is TestCtrlClass/Test2
, not TestCtrlClass/Test2/anything_here
. So your attribute should be:
[HttpPost]
[Route("Test2")]
public bool Test2([FromBody] ClassName item)
Also I believe [FromBody]
is not needed here.