Linked Questions

63 votes
7 answers
123k views

I am using Entity Framework 6 in an MVC 5 project. As you're aware of, SELECT queries in SQL Server perform faster and more efficient if we use WITH (NOLOCK) in them. I checked out a few SQL SELECT ...
Arash's user avatar
  • 4,387
13 votes
1 answer
17k views

Possible Duplicate: Entity Framework with NOLOCK I'm using EF4 and .Net 4 to load some XML from a file into a database. I have a class the wraps around the ObjectContext and has methods that add ...
James's user avatar
  • 927
39 votes
5 answers
18k views

With the new async/await keywords in C#, there are now impacts to the way (and when) you use ThreadStatic data, because the callback delegate is executed on a different thread to one the async ...
theburningmonk's user avatar
20 votes
4 answers
16k views

What's the difference between using "SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED" and NOLOCK? Is one better than the other?
ozzijb's user avatar
  • 694
4 votes
3 answers
14k views

I have Entity Framework (.NET 4.0) going against SQL Server 2008. The database is (theoretically) getting updated during business hours -- delete, then insert, all through a transaction. Practically, ...
bryanjonker's user avatar
  • 3,454
7 votes
1 answer
8k views

I have an OData service (WCF Data Service using Entity Framework). All this service does is select data. (No writes EVER.) When I run my OData queries, I am occasionally getting errors like this: ...
Vaccano's user avatar
  • 83.2k
4 votes
2 answers
8k views

I am trying to use TransactionScope in my SELECT query in EntityFramework Core 2.0. However I am getting this error : "Enlisting in Ambient transactions is not supported." The idea is to implement "...
Alan B's user avatar
  • 2,319
7 votes
3 answers
5k views

I have a problem where one of my Entity Framework (EF) queries is taking a very long time to execute in Sql Server, although when I copy-and-paste the generated TSQL into Sql Server Management Studio (...
Mike's user avatar
  • 7,701
3 votes
3 answers
3k views

What am I missing? I'm trying to read with NOLOCK using a TransactionScope like this: var scopeOptions = new TransactionOptions { IsolationLevel = IsolationLevel.ReadUncommitted }; using (var scope =...
Yovav's user avatar
  • 2,827
6 votes
2 answers
4k views

I heard that SQL Server SELECT statements causing blocking. So I have MVC application with EF and SQL Server 2008 and it shares DB with another application which is very frequently writes some data. ...
Vladimirs's user avatar
  • 8,659
4 votes
0 answers
14k views

ASP.NET MVC project 4.5 and EntityFramework Database First. I have some command, which will be triggered when the user clicks a button using (TransactionScope scope = new TransactionScope()) { ...
Hakan Fıstık's user avatar
0 votes
1 answer
9k views

Occasionally, while debugging some older application code, we receive an exception. This is the offending line of code: XMLReferenceSequence lastXml = (from xml in _entities.XMLReferenceSequences ...
Stefan Zvonar's user avatar
2 votes
2 answers
1k views

I have a c# entity framework application. I am trying to run a stored procedure from code (no problem with that). its long running, around 30 mins. I write a log of each transaction to a SQL table as ...
scottsanpedro's user avatar
3 votes
2 answers
1k views

I'm working with a system using Entity Framework, and I'm wrapping a call in a TransactionScope but only because I want to set the IsolationLevel as ReadUncommited (basically doing NOLOCK, as ...
Mike G's user avatar
  • 173
1 vote
1 answer
2k views

I'm developing a web application using ASP.NET MVC and EF6 to access the database. One of the features of my web application allow the user to download a Excel file. The query to get the information ...
Fsittius's user avatar
  • 160

15 30 50 per page