set transaction isolation level read only uncommitted in LINQ

Aug 13, 10

apparently you can use a transaction scope for this and just wrap everything that way. but to me that seems more complicated than just enabling it with execute command.

some LINQ code like (note that ‘this’ is a data context):

this.ExecuteCommand("set transaction isolation level read uncommitted"); 

Produces this sql code:

set transaction isolation level read uncommitted 

SELECT TOP 5 <fieldnames> FROM [MyTable] AS [t0] 

That’s what I want to see, so yay. 😀

some links:

ps. trying to use livewriter today. so far, not excited about it and still like word more 😛 hopefully i’ll get elightened.