- Timestamp:
- 08/27/09 17:47:37 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs ¶
r2306 r2314 68 68 } 69 69 70 public voidPersist(HeuristicLab.Modeling.IAlgorithm algorithm) {70 public IModel Persist(HeuristicLab.Modeling.IAlgorithm algorithm) { 71 71 GetOrCreateProblem(algorithm.Dataset); 72 Persist(algorithm.Model, algorithm.Name, algorithm.Description);73 } 74 75 public voidPersist(HeuristicLab.Modeling.IAnalyzerModel model, string algorithmName, string algorithmDescription) {72 return Persist(algorithm.Model, algorithm.Name, algorithm.Description); 73 } 74 75 public IModel Persist(HeuristicLab.Modeling.IAnalyzerModel model, string algorithmName, string algorithmDescription) { 76 76 Dictionary<string, Variable> variables = GetAllVariables(); 77 77 Algorithm algo = GetOrCreateAlgorithm(algorithmName, algorithmDescription); … … 133 133 ctx.SubmitChanges(); 134 134 } 135 136 //if connected to database return inserted model 137 if (this.ctx != null) 138 return this.ctx.Models.Where(x => x.Id == m.Id).Single(); 139 return null; 135 140 } 136 141 … … 149 154 IProblem problem; 150 155 if (ctx.Problems.Count() == 0) 151 problem = 156 problem = PersistProblem(dataset); 152 157 else 153 158 problem = ctx.Problems.Single();
Note: See TracChangeset
for help on using the changeset viewer.