PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

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

PrepAway - Latest Free Exam Questions & Answers

A.
SqlConnection.BeginTransaction(IsolationLevel.RepeatableRead);

B.
SqlConnection.BeginTransaction(IsolationLeve.ReadUnconvnited);

C.
SqlConneetion.BeginTransaction(IsolationLevel.Serializable);

D.
SqlConnection.BeginTransaction(IsolationLevel.Snapshot);

4 Comments on “Which code segment should you use?

  1. Iron says:

    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.




    3



    0

Leave a Reply