Problems with Post Ajax in Asp.net core MVC

后端 未结 1 899
走了就别回头了
走了就别回头了 2021-01-26 06:29

I can not send a Model that I am manually creating to my controller. When I send the request, it\'s coming up with empty properties. There is something wrong that is hindering t

1条回答
  •  孤街浪徒
    2021-01-26 06:30

    ASP.NET Core requires to add [FromBody] attribute to parameter to parse application/json content

    [HttpPost]
    [Route("pessoa-gerenciar/changeFormaContato")]
    public IActionResult changeFormaContato([FromBody] OperadoraChamadaViewModel operadoraChamadaViewModel)
    

    0 讨论(0)
提交回复
热议问题