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.
5 Replies
Your question isn't doesn't make the problem particularly clear
but when (editing) I add one more it stops workingNot sure what that means exactly
but when i'm editing and add one more to the collection it stops working, I speak English the best I can XD
Post some code or something because the problem is not clear from your question
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
✅ This post has been marked as answered!