以下方法应该在打开的连接上执行脏读。没有交易。我在哪里设置隔离级别?
public string DoDirtyRead(string storedProcName, SqlConnection connection)
{
using (SqlCommand command = new SqlCommand(storedProcName, connection))
{
command.CommandType = CommandType.StoredProcedure;
// HOW TO SET IsolationLevel to READ_UNCOMMITTED here?
command.ExecuteNonQuery();
}
}