Last change
on this file since 3578 was
3578,
checked in by kgrading, 14 years ago
|
Removed References to HiveLogging and updated the default logging mechanism (#991)
|
File size:
867 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Data.Common;
|
---|
6 | using System.Data.SqlClient;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.Hive.Server.LINQDataAccess {
|
---|
9 | public class ContextFactory {
|
---|
10 | [ThreadStatic]
|
---|
11 | private static HiveDataContext _hiveDataContext = null;
|
---|
12 |
|
---|
13 | [ThreadStatic]
|
---|
14 | private static SqlTransaction _currentTransaction = null;
|
---|
15 |
|
---|
16 | public static HiveDataContext Context {
|
---|
17 | get {
|
---|
18 | if(_hiveDataContext == null)
|
---|
19 | _hiveDataContext = new HiveDataContext();
|
---|
20 | return _hiveDataContext;
|
---|
21 | }
|
---|
22 | set {
|
---|
23 | _hiveDataContext = value;
|
---|
24 | }
|
---|
25 | }
|
---|
26 |
|
---|
27 | public static SqlTransaction CurrentTransaction {
|
---|
28 | get {
|
---|
29 | return _currentTransaction;
|
---|
30 | } set {
|
---|
31 | _currentTransaction = value;
|
---|
32 | }
|
---|
33 | }
|
---|
34 | }
|
---|
35 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.