Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Data.Linq;
|
---|
4 | using System.Data.Linq.Mapping;
|
---|
5 | using System.Text;
|
---|
6 |
|
---|
7 | using HeuristicLab.DataAnalysis;
|
---|
8 | using HeuristicLab.Core;
|
---|
9 |
|
---|
10 | namespace HeuristicLab.Modeling.Database.SQLServerCompact {
|
---|
11 | [Table(Name = "Problem")]
|
---|
12 | public class Problem : IProblem {
|
---|
13 | public Problem() {
|
---|
14 | }
|
---|
15 |
|
---|
16 | public Problem(Dataset dataset)
|
---|
17 | : this() {
|
---|
18 | this.Dataset = dataset;
|
---|
19 | }
|
---|
20 |
|
---|
21 | private int id;
|
---|
22 | [Column(Storage = "id", IsPrimaryKey = true, IsDbGenerated = true)]
|
---|
23 | public int Id {
|
---|
24 | get { return this.id; }
|
---|
25 | private set { this.id = value; }
|
---|
26 | }
|
---|
27 |
|
---|
28 | private byte[] data;
|
---|
29 | [Column(Storage = "data", DbType = "image", CanBeNull = false)]
|
---|
30 | public byte[] Data {
|
---|
31 | get { return this.data; }
|
---|
32 | private set { this.data = value; }
|
---|
33 | }
|
---|
34 |
|
---|
35 | public Dataset Dataset {
|
---|
36 | get { return (Dataset)PersistenceManager.RestoreFromGZip(this.Data); }
|
---|
37 | set { this.Data = PersistenceManager.SaveToGZip(value); }
|
---|
38 | }
|
---|
39 | }
|
---|
40 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.