LINQ to SQL with NOLOCK

   1:  using (var con = new SqlConnection("constr"))
   2:  {
   3:      con.Open();
   4:   
   5:      using (var transaction = con.BeginTransaction(
   6:          IsolationLevel.ReadUncommitted))
   7:      {
   8:          using (var context = new dbDataContext(con))
   9:          {
  10:              // HACK: Setting the context.Transaction is 
  11:              // needed in .NET 3.5 (fixed in .NET 4.0).
  12:              context.Transaction = transaction;
  13:              var q = from s in context.Students select c;
  14:          }
  15:      }
  16:  }

posted @ mercoledì 27 marzo 2013 16:25

Print

Comments on this entry:

# bigo live app

Left by bigo live app at 23/06/2017 10:39
Gravatar
bigo live app is the best apk that you can download for free. This Article is all About Bigo Live Apk

# bigo live app

Left by bigo live app at 23/06/2017 10:45
Gravatar
bigo live app is the best apk that you can download for free. This Article is all About Bigo Live Apk

# re: LINQ to SQL with NOLOCK

Left by seo at 22/12/2017 14:04
Gravatar
seo
Comments have been closed on this topic.
«novembre»
domlunmarmergiovensab
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567