Search code examples
angular9asp.net-core-3.1ionic5

DTO gets lost in transmission POST to REST API?


My object is being lost in transmission. I (1) enter some text, (2) submit a form and (3) see the correct POST and (3) I see the objects construction is correct and (3) that the http.post method is being used. However on the ServerSide I see (4) that the controller is receiving a null object. Please help!

enter image description here

enter image description here

Using Angular 9, Ionic 5's http client... very straightforward... .NET Core 3.1 c# backend...


Solution

  • Actually I needed to add the [ApiController] attribute to the controller.