Changeset 9393 for branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/HiveOperationContext.cs
- Timestamp:
- 04/23/13 18:33:15 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/HiveOperationContext.cs
r9391 r9393 39 39 } 40 40 41 public HiveDataContext DataContext { get; private set; } 41 private HiveDataContext dataContext; 42 public HiveDataContext DataContext { 43 get { 44 if (dataContext == null) { 45 dataContext = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString); 46 //dataContext.Log = new DebugWriter(); 47 } 48 return dataContext; 49 } 50 } 51 42 52 43 53 public void Attach(OperationContext owner) { 44 DataContext = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);45 //DataContext.Log = new DebugWriter();46 54 } 47 55 48 56 public void Detach(OperationContext owner) { 49 DataContext.Dispose(); 57 if (dataContext != null) { 58 dataContext.Dispose(); 59 } 50 60 } 51 61 }
Note: See TracChangeset
for help on using the changeset viewer.