ASP.NET Core API - Post to accept JSON array with multiple items
I'm new to C#. I'm working through a tutorial for an ASP.NET Core API, and I'm trying to modify it slightly. The tutorial had the code below in the controller which accepts a single JSON item correctly.
I want to modify it to accept a JSON array with multiple items. I've been able to make the modification to accept the array and it works, however the original example returned a result containing the single new record including the new id. I'd like my modifications to do the same but with all the new records created if there are more than one. At the moment it just returns nothing.
I want to modify it to accept a JSON array with multiple items. I've been able to make the modification to accept the array and it works, however the original example returned a result containing the single new record including the new id. I'd like my modifications to do the same but with all the new records created if there are more than one. At the moment it just returns nothing.
