gianmonky
Net core 6 Web api update-add collections to a created entity [Answered]
I am trying to update an entity that has a collection, when creating it with 1 item in the collection it works, when editing that single item too, but when i'm editing and add one more to the collection it stops working
I'm doing a foreach(var item in entity.collection) for this, I understand that as long as it's not deleting it shouldn't interfere with the foreach, the item already exists in the array so...
One option is to delete all existing items in the db and create them anew on each edit, but there must be something better.
9 replies