- Timestamp:
- 07/29/09 13:39:43 (15 years ago)
- Location:
- branches/HeuristicLab.Modeling Database Backend/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs
r2203 r2205 60 60 using (ModelingDataContext ctx = new ModelingDataContext(connection)) { 61 61 foreach (string inputVariable in algorithm.Model.InputVariables) { 62 ctx.InputVariables.InsertOnSubmit(new InputVariable(model, variables[inputVariable])); 63 } 62 ctx.InputVariables.InsertOnSubmit(new InputVariable(model, variables[inputVariable])); 63 } 64 ctx.SubmitChanges(); 64 65 } 65 66 … … 209 210 #endregion 210 211 212 #region InputVariableResults 213 public IEnumerable<IInputVariableResult> GetInputVariableResults(IModel model) { 214 ModelingDataContext ctx = new ModelingDataContext(connection); 215 DataLoadOptions dlo = new DataLoadOptions(); 216 dlo.LoadWith<InputVariableResult>(ir => ir.Variable); 217 dlo.LoadWith<InputVariableResult>(ir => ir.Result); 218 dlo.LoadWith<InputVariableResult>(ir => ir.Model); 219 ctx.LoadOptions = dlo; 220 221 var inputResults = from ir in ctx.InputVariableResults 222 where ir.Model == model 223 select ir; 224 return inputResults.ToList().Cast<IInputVariableResult>(); 225 } 226 227 #endregion 228 211 229 #region Model 212 230 public IEnumerable<IModel> GetAllModels() { -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database/3.2/IModelingDatabase.cs
r2194 r2205 31 31 IEnumerable<IResult> GetAllResults(); 32 32 IEnumerable<IModelResult> GetModelResults(IModel model); 33 IEnumerable<IInputVariableResult> GetInputVariableResults(IModel model); 33 34 } 34 35 }
Note: See TracChangeset
for help on using the changeset viewer.