Changeset 2314
- Timestamp:
- 08/27/09 17:47:37 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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(); -
trunk/sources/HeuristicLab.Modeling.Database/3.2/IModelingDatabase.cs
r2304 r2314 28 28 namespace HeuristicLab.Modeling.Database { 29 29 public interface IModelingDatabase { 30 void Persist(HeuristicLab.Modeling.IAnalyzerModel model, string algorithmName, string algorithmDescription);31 void Persist(HeuristicLab.Modeling.IAlgorithm algorithm);30 IModel Persist(HeuristicLab.Modeling.IAlgorithm algorithm); 31 IModel Persist(HeuristicLab.Modeling.IAnalyzerModel model, string algorithmName, string algorithmDescription); 32 32 IProblem PersistProblem(Dataset dataset); 33 33
Note: See TracChangeset
for help on using the changeset viewer.