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: }