I'm using Entity Framework, model first, self-tracking entities with Npgsql provider (VS2010 - .NET 4 target).
I'm trying to track optimistic concurrency exceptions, but my problem is that as soon as a column in the entity is marked as fixed, an OptimisticConcurrencyException
is raised, even if the affected rows > 0.
After some digging exposed here, I would like to know why Entity Framework is issuing the update command through dbCommand.ExecuteReader(CommandBehavior.SequentialAccess)
followed by a dbDataReader.Read()
instead of dbCommand.ExecuteNonQuery()
when the command text is a simple update statement ?
UPDATE "schema"."table"
SET "bool_column" = FALSE
WHERE ("id" = 7526) AND ("xmin" = 1249804)
Thanks.