What is the most efficient way to implement add or update using Entity Framework Core 7 for IEnumerable<MyEntity> myentities
?
Tried to loop through each item and
myDBContext.CustomAddUpdate(item);
myDBContext.SaveChanges();
CustomAddUpdate
method use entry for given entity and get the state Add or Update of DBContext
.
Hello I think I understand what you want to do, please see if the following works for you: