- Timestamp:
- 09/02/09 16:48:56 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Model.cs
r2293 r2326 32 32 public Model() { 33 33 targetVariable = default(EntityRef<Variable>); 34 algorithm = default(EntityRef<Algorithm>); 34 algorithm = default(EntityRef<Algorithm>); 35 35 } 36 36 … … 94 94 } 95 95 96 private string name; 97 [Column(Storage = "name", CanBeNull = true)] 98 public string Name { 99 get { return this.name; } 100 set { this.name = value; } 101 } 102 96 103 private int trainingSamplesStart; 97 104 [Column(Storage = "trainingSamplesStart", CanBeNull = false)] -
trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs
r2314 r2326 264 264 } 265 265 266 public void UpdateModel(IModel model) { 267 Model m = (Model)model; 268 Model orginal = ctx.Models.GetOriginalEntityState(m); 269 if (orginal == null) 270 ctx.Models.Attach(m); 271 ctx.SubmitChanges(); 272 } 273 266 274 public byte[] GetModelData(IModel model) { 267 275 var data = (from md in ctx.ModelData … … 273 281 } 274 282 283 public void UpdateModelData(IModel model, byte[] modelData) { 284 Model m = (Model)model; 285 ctx.ModelData.DeleteAllOnSubmit(ctx.ModelData.Where(x => x.Model == m)); 286 ctx.ModelData.InsertOnSubmit(new ModelData(m, modelData)); 287 ctx.SubmitChanges(); 288 } 289 275 290 public IPredictor GetModelPredictor(IModel model) { 276 291 byte[] data = GetModelData(model); -
trunk/sources/HeuristicLab.Modeling.Database/3.2/IModel.cs
r2223 r2326 29 29 IVariable TargetVariable { get; } 30 30 IAlgorithm Algorithm { get; } 31 string Name { get; set; } 31 32 int TrainingSamplesStart { get; } 32 33 int TrainingSamplesEnd { get; } -
trunk/sources/HeuristicLab.Modeling.Database/3.2/IModelingDatabase.cs
r2314 r2326 32 32 IProblem PersistProblem(Dataset dataset); 33 33 34 void UpdateModel(IModel model); 35 void UpdateModelData(IModel model, byte[] modelData); 36 34 37 IEnumerable<IModel> GetAllModels(); 35 38 IEnumerable<IResult> GetAllResults();
Note: See TracChangeset
for help on using the changeset viewer.