mapping a dynamic object to an existing object and only map properties that exist in the source obj
I need help with patching an object in ASP Core, on my api i only send a partial data of the object i want to update, i looked into
and in my API I only want to update specific properties, so I decided to take a dynamic object in my action
in my update method i have this code
now, for some reason
JsonPatchDocument<T> but the syntax is too complicated compared to what my competitors do with their API, what i want here is just for my customers to send a json with the properties and values they want to change and that's it, let's say i have an object likeand in my API I only want to update specific properties, so I decided to take a dynamic object in my action
in my update method i have this code
now, for some reason
existingCar has all properties turned to their default or null values, how should i fix this? is there an alternative library for doing this