Domanda

Here what decompiler shows:

public enum IsolationLevel
{
  Unspecified = -1,
  Chaos = 16,
  ReadUncommitted = 256,
  ReadCommitted = 4096,
  RepeatableRead = 65536,
  Serializable = 1048576,
  Snapshot = 16777216,
}

But Serializable locks data thus providing more guarantees for concurrency correctness than Snapshot does. So what is the reason for value of Snapshot is greater?

È stato utile?

Soluzione

Numerically greater has no particular bearing here on "level of isolation". Each item simply represents a different type of isolation. For what that means you must refer to the documentation. These are actually just bit-wise flags at 4-bit spacings. No particular meaning is intended by the values used, other than internal implementation details.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top