In my VisualStudio, I have an MVC and API WebApplication Project. Utilizing angularjs on the client side, I aim to establish communication between the client and server using angularjs resource to transmit data to my CRUD Api methods.
Retrieving and modifying data (Car objects in an array) on the client side functions properly.
The challenge arises when attempting to create a new object. Despite having seemingly identical variables and datatypes in the object created compared to those from the server side, sending them to the server fails. My assumption is that the dataType may still be different, preventing the method from being called due to the discrepancy in parameters.
Is there a method to generate a complex dataType in js that would be recognized as the server-side one?
Are there alternative approaches for creating a new object on the client side? (One thought was to receive an empty object from the server to populate on the client side, but that approach seems unconventional...)