This question is locked. New answers and comments are not allowed.
Hello, i want to update database with multithreading.
I what to archive following scenario but it throw Row not found exception.
Parallel.For(0, 100, new ParallelOptions() {MaxDegreeOfParallelism = 16}, i =>
{
using (var db = new EntitiesModel())
{
db.Tests.Single(p => p.Id == 1).Count++;
db.SaveChanges();
}
});