In my case, the ajax request works correctly, it prints the values in the console, but when it arrives in the Create method, the object is empty. And then it registers the name as null.


@jonasmarco Can you please provide a link to the doc you're looking at?
hi @scottaddie there is https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-2.1
Can you show your entire controller and show how you are posting the form body?
Hi @davidfowl
My Controller
Here: https://hastebin.com/ihorivemep.cs
Sorry, I'm not sure if I'm correctly stating the second question. So I'm going to send an image of the form.

You have some JavaScript code that鈥檚 doing the post right? What does that look like?
I think I found the problem, it was the lack of encode, I just added these two lines of code in the ajax call.
dataType: "json",
contentType: "application/json; charset=utf-8",
@davidfowl and @scottaddie
Thanks for helping me!
Most helpful comment
@davidfowl and @scottaddie
Thanks for helping me!