This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AsyncSqlTestService : IAsyncSqlTestService | |
{ | |
public int DoStuffSynchronously(int value) | |
{ | |
using (var conn = new SqlConnection(ConfigurationManager.ConnectionStrings["testDatabase"].ConnectionString)) | |
{ | |
conn.Open(); | |
using (var tran = conn.BeginTransaction(IsolationLevel.Serializable)) | |
{ | |
using (var cmd = new SqlCommand("waitfor delay '00:00:08'", conn, tran)) |