Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8023423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:33:35+00:00 2026-06-04T22:33:35+00:00

I have a SQL statement with a bunch of NOLOCKs in it. After doing

  • 0

I have a SQL statement with a bunch of NOLOCKs in it. After doing some research I came across a way to deal with this in LINQ to SQL. Here is how I did it:

int year = 2011;
int quarter = 4;

DateTime timeframe = new DateTime(year, (quarter * 3), 01).AddMonths(1); 


using (var txn = new TransactionScope(
    TransactionScopeOption.Required, 
    new TransactionOptions
    {
        IsolationLevel = IsolationLevel.ReadUncommitted
    }))
{
    // Your LINQ to SQL query goes here
    var results =

        from wo in WORKORDERs

            join wot in WORKORDERTYPEs on wo.Wot_oi equals wot.Wotyoi

            join pri in PRIORITies on wo.Prio_oi equals pri.Priooi

            join s in SITEs on wo.BEparn_oi equals s.Siteoi

        where wo.Audt_created_dttm.Value.Year >= year - 3 && wo.Audt_created_dttm.Value.Year >= 2006    
            && wo.Audt_created_dttm < timeframe && (s.Id =="NM" || s.Id == "TH") && 
            (!wot.Id.Contains("stand") && wo.Ci_cnc_date != null && pri.Prioid != "1 - Routine") &&
            (pri.Prioid.Contains("1") || pri.Prioid.Contains("2") || pri.Prioid.Contains("3"))

        select new {PM = wo.Wosource, Site = s.Id, Priority = pri.Prioid, Worktype = wot.Id,
            WoNumber = wo.Id, Description = wo.Aenm, CreateDate = wo.Audt_created_dttm, 
            CloseDate = wo.Clsdt_date, Planning = 
                (pri.Prioid == "1 - Routine" || pri.Prioid == "6 - Planned Outage") ? "Planned" : "Unplanned"}; 
}

The problem is that I receive this error and can find no information on it.

'IsolationLevel' is an ambiguous reference between 'System.Data.IsolationLevel' and 'System.Transactions.IsolationLevel'

Cannot implicitly convert type 'System.Data.IsolationLevel' to 'System.Transactions.IsolationLevel'. An explicit conversion exists (are you missing a cast?)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:33:36+00:00Added an answer on June 4, 2026 at 10:33 pm

    it looks like this code:

    new TransactionOptions
    {
        IsolationLevel = IsolationLevel.ReadUncommitted
    }
    

    should be:

    new TransactionOptions
    {
        IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this sql statement: SELECT * from tBooks where BookNbr = '20111122-001' BookNbr
I have a sql statement that uses Difference => http://msdn.microsoft.com/en-us/library/ms188753.aspx I do this in
I have this sql statement: CREATE TABLE [dbo].[User]( [UserId] [int] IDENTITY(1,1) NOT NULL, [FirstName]
I have a SQL-statement like this: SELECT name FROM users WHERE deleted = 0;
I have a SQL Statement that I am trying to convert to a LINQ
I have a SQL statement that is something like this SELECT t1.* CASE WHEN
I have this sql statement SELECT userID from users WHERE (name='name1' AND username='username1') OR
I have this SQL statement below INSERT into 2011_electricity ( date, energy, daynum) VALUES
I have a bunch of SQL statements to execute on a database. (I'm doing
I have sql statement one; select linkscat.id, linkscat.category from linkscat, contentlinks, links where contentlinks.linksid

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.