Which code segment should you use?

You need to update the ImportBooks() method to use database transactions. Which code
segment should you use?

You need to update the ImportBooks() method to use database transactions. Which code
segment should you use?

A.
SqlConnection.BeginTransaction(IsolationLevel.RepeatableRead);

B.
SqlConnection.BeginTransaction(IsolationLeve.ReadUnconvnited);

C.
SqlConneetion.BeginTransaction(IsolationLevel.Serializable);

D.
SqlConnection.BeginTransaction(IsolationLevel.Snapshot);



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Iron

Iron

I’d go for Option: D…

The scenario says: “The ImportBooks() method must keep a copy of the data that can be accessed while new books are being imported without
blocking reads.”

On the other hand, Snapshot is known to be explained as: “An effective copy of the data is made, so one version of the application can read the data while another is modifying the same data.”

I therefore, without fear or favor nor prejudiced, vote for Option: D.