Logically, I did not get an answer that gives the correct explanation of -fix for this error. However, this answer resolved my issue. Another thought I observed is that the solution is that if the new object has exactly the same values as for the entity-based database, it will not update the table.
eg.
context.Set<Student>().AddOrUpdate(wouldBeUpdatedStudent); result = await context.SaveChangesAsync().ConfigureAwait(false);
Reason I cannot use AsNoTracking() , because I have nested objects that are the same for another circuit. So even if I use AsNoTracking() in a top-level entity, I get the same error for the child level. Same as in my question.
Kenz Aug 15 '17 at 16:32 2017-08-15 16:32
source share