- Timestamp:
- 08/21/09 12:32:42 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Problem.cs
r2229 r2304 56 56 public Dataset Dataset { 57 57 get { return (Dataset)PersistenceManager.RestoreFromGZip(this.Data); } 58 set { this.Data = PersistenceManager.SaveToGZip(value); }58 private set { this.Data = PersistenceManager.SaveToGZip(value); } 59 59 } 60 60 } -
trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs
r2303 r2304 145 145 } 146 146 147 public Problem GetOrCreateProblem(Dataset dataset) {148 Problem problem;147 public IProblem GetOrCreateProblem(Dataset dataset) { 148 IProblem problem; 149 149 if (ctx.Problems.Count() == 0) 150 problem = PersistProblem(dataset);150 problem = PersistProblem(dataset); 151 151 else 152 152 problem = ctx.Problems.Single(); … … 156 156 } 157 157 158 p rivateProblem PersistProblem(Dataset dataset) {158 public IProblem PersistProblem(Dataset dataset) { 159 159 Problem problem; 160 160 using (ModelingDataContext ctx = new ModelingDataContext(connection)) { … … 272 272 } 273 273 #endregion 274 275 #region Problem276 public IProblem GetProblem() {277 if (ctx.Problems.Count() == 0)278 return null;279 return ctx.Problems.Single();280 }281 #endregion282 274 } 283 275 }
Note: See TracChangeset
for help on using the changeset viewer.