Hasantha
Hasantha

Reputation: 117

.net MVC3 BeginTransaction() locks the table

How can I read from the table when another transaction is processing?

Im using BeginTransaction(). So when another process try to read from that particular table I get a timeout because the previous transaction is holding the table.

How can I make the table to be readable when a transaction is ongoing?

Thanks in advance.

Upvotes: 1

Views: 377

Answers (1)

NibblyPig
NibblyPig

Reputation: 52952

You can specify the isolationLevel parameter, as shown in the documentation here

The isolation level you want depends on what you're trying to do, because the value you read will depend on whether the write has finished or not.

Upvotes: 1

Related Questions