Changeset 2371 for trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Model.cs
- Timestamp:
- 09/21/09 14:15:37 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Model.cs
r2326 r2371 32 32 public Model() { 33 33 targetVariable = default(EntityRef<Variable>); 34 algorithm = default(EntityRef<Algorithm>); 34 algorithm = default(EntityRef<Algorithm>); 35 35 } 36 36 37 public Model(Variable targetVariable, Algorithm algorithm )37 public Model(Variable targetVariable, Algorithm algorithm, ModelType modelType) 38 38 : this() { 39 39 this.targetVariableId = targetVariable.Id; 40 40 this.algorithmId = algorithm.Id; 41 ModelType = modelType.ToString(); 41 42 } 42 43 … … 94 95 } 95 96 97 private string modelType; 98 [Column(Storage = "modelType", CanBeNull = false)] 99 public string ModelType { 100 get { return this.modelType; } 101 private set { this.modelType = value; } 102 } 103 104 ModelType IModel.ModelType { 105 get { 106 if (!Enum.IsDefined(typeof(ModelType), this.modelType)) 107 throw new ArgumentException("ModelType " + modelType + " not declared."); 108 return (ModelType)Enum.Parse(typeof(ModelType), this.modelType); 109 } 110 } 111 96 112 private string name; 97 113 [Column(Storage = "name", CanBeNull = true)]
Note: See TracChangeset
for help on using the changeset viewer.