Hi,
My Api Controller looks like this for creating new category.
The entities are category and model. CategoryId acts as FK in Model.
while i am creating new category on server side i am getting the error. Please have a look at the screenshot below. can you please help me with the problem!!


Jignesh KumarPosted Mar 27, 2023, 7:31 AM
Its deserialization issue in your code. You are trying to convert your json which does not matching your emity model. Due to that you are getting this error.
Try to create your model in same format you are getting from response.
Tuhin PaulPosted Mar 26, 2023, 5:04 PM
The issue is with the JSON serialization/deserialization when trying to convert the incoming JSON data to the Model entity in your CreateModel action method. You should check the JSON data being sent from the client-side is valid and matches the expected schema for the Model entity. Also check that the data types of the properties in the Model entity match the corresponding properties in the JSON data.
Alex AlvesPosted Nov 9, 2022, 6:10 PM
solved? i have this same problem
Narmadha DoddaPosted Sep 10, 2022, 10:29 PM