gianmonky
gianmonky
CC#
Created by gianmonky on 10/13/2022 in #help
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
CC#
Created by gianmonky on 10/11/2022 in #help
Net 6 WebApi Config EF cancel loop reference in update
Please help I need to cancel the loop by reference so that it can update and add information correctly. I would like to know if there is a way to do it in net 6 web api in the builder.service
1 replies