Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/OKB.designer.cs @ 5397

Last change on this file since 5397 was 5397, checked in by swagner, 14 years ago

Worked on OKB (#1174)

File size: 96.9 KB
Line 
1#pragma warning disable 1591
2//------------------------------------------------------------------------------
3// <auto-generated>
4//     This code was generated by a tool.
5//     Runtime Version:4.0.30319.1
6//
7//     Changes to this file may cause incorrect behavior and will be lost if
8//     the code is regenerated.
9// </auto-generated>
10//------------------------------------------------------------------------------
11
12namespace HeuristicLab.Services.OKB.DataAccess
13{
14  using System.Data.Linq;
15  using System.Data.Linq.Mapping;
16  using System.Data;
17  using System.Collections.Generic;
18  using System.Reflection;
19  using System.Linq;
20  using System.Linq.Expressions;
21  using System.ComponentModel;
22  using System;
23 
24 
25  [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="HeuristicLab.OKB")]
26  public partial class OKBDataContext : System.Data.Linq.DataContext
27  {
28   
29    private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
30   
31    #region Extensibility Method Definitions
32    partial void OnCreated();
33    partial void InsertAlgorithmClass(AlgorithmClass instance);
34    partial void UpdateAlgorithmClass(AlgorithmClass instance);
35    partial void DeleteAlgorithmClass(AlgorithmClass instance);
36    partial void InsertProblemClass(ProblemClass instance);
37    partial void UpdateProblemClass(ProblemClass instance);
38    partial void DeleteProblemClass(ProblemClass instance);
39    partial void InsertAlgorithmUser(AlgorithmUser instance);
40    partial void UpdateAlgorithmUser(AlgorithmUser instance);
41    partial void DeleteAlgorithmUser(AlgorithmUser instance);
42    partial void InsertProblemUser(ProblemUser instance);
43    partial void UpdateProblemUser(ProblemUser instance);
44    partial void DeleteProblemUser(ProblemUser instance);
45    partial void InsertPlatform(Platform instance);
46    partial void UpdatePlatform(Platform instance);
47    partial void DeletePlatform(Platform instance);
48    partial void InsertDataType(DataType instance);
49    partial void UpdateDataType(DataType instance);
50    partial void DeleteDataType(DataType instance);
51    partial void InsertValueName(ValueName instance);
52    partial void UpdateValueName(ValueName instance);
53    partial void DeleteValueName(ValueName instance);
54    partial void InsertAlgorithm(Algorithm instance);
55    partial void UpdateAlgorithm(Algorithm instance);
56    partial void DeleteAlgorithm(Algorithm instance);
57    partial void InsertProblem(Problem instance);
58    partial void UpdateProblem(Problem instance);
59    partial void DeleteProblem(Problem instance);
60    partial void InsertBinaryData(BinaryData instance);
61    partial void UpdateBinaryData(BinaryData instance);
62    partial void DeleteBinaryData(BinaryData instance);
63    partial void InsertRun(Run instance);
64    partial void UpdateRun(Run instance);
65    partial void DeleteRun(Run instance);
66    partial void InsertValue(Value instance);
67    partial void UpdateValue(Value instance);
68    partial void DeleteValue(Value instance);
69    partial void InsertCharacteristic(Characteristic instance);
70    partial void UpdateCharacteristic(Characteristic instance);
71    partial void DeleteCharacteristic(Characteristic instance);
72    partial void InsertCharacteristicValue(CharacteristicValue instance);
73    partial void UpdateCharacteristicValue(CharacteristicValue instance);
74    partial void DeleteCharacteristicValue(CharacteristicValue instance);
75    #endregion
76   
77    public OKBDataContext() :
78        base(global::HeuristicLab.Services.OKB.DataAccess.Properties.Settings.Default.OKBConnectionString, mappingSource)
79    {
80      OnCreated();
81    }
82   
83    public OKBDataContext(string connection) :
84        base(connection, mappingSource)
85    {
86      OnCreated();
87    }
88   
89    public OKBDataContext(System.Data.IDbConnection connection) :
90        base(connection, mappingSource)
91    {
92      OnCreated();
93    }
94   
95    public OKBDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
96        base(connection, mappingSource)
97    {
98      OnCreated();
99    }
100   
101    public OKBDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
102        base(connection, mappingSource)
103    {
104      OnCreated();
105    }
106   
107    public System.Data.Linq.Table<AlgorithmClass> AlgorithmClasses
108    {
109      get
110      {
111        return this.GetTable<AlgorithmClass>();
112      }
113    }
114   
115    public System.Data.Linq.Table<ProblemClass> ProblemClasses
116    {
117      get
118      {
119        return this.GetTable<ProblemClass>();
120      }
121    }
122   
123    public System.Data.Linq.Table<AlgorithmUser> AlgorithmUsers
124    {
125      get
126      {
127        return this.GetTable<AlgorithmUser>();
128      }
129    }
130   
131    public System.Data.Linq.Table<ProblemUser> ProblemUsers
132    {
133      get
134      {
135        return this.GetTable<ProblemUser>();
136      }
137    }
138   
139    public System.Data.Linq.Table<Platform> Platforms
140    {
141      get
142      {
143        return this.GetTable<Platform>();
144      }
145    }
146   
147    public System.Data.Linq.Table<DataType> DataTypes
148    {
149      get
150      {
151        return this.GetTable<DataType>();
152      }
153    }
154   
155    public System.Data.Linq.Table<ValueName> ValueNames
156    {
157      get
158      {
159        return this.GetTable<ValueName>();
160      }
161    }
162   
163    public System.Data.Linq.Table<Algorithm> Algorithms
164    {
165      get
166      {
167        return this.GetTable<Algorithm>();
168      }
169    }
170   
171    public System.Data.Linq.Table<Problem> Problems
172    {
173      get
174      {
175        return this.GetTable<Problem>();
176      }
177    }
178   
179    public System.Data.Linq.Table<BinaryData> BinaryDatas
180    {
181      get
182      {
183        return this.GetTable<BinaryData>();
184      }
185    }
186   
187    public System.Data.Linq.Table<Run> Runs
188    {
189      get
190      {
191        return this.GetTable<Run>();
192      }
193    }
194   
195    public System.Data.Linq.Table<Value> Values
196    {
197      get
198      {
199        return this.GetTable<Value>();
200      }
201    }
202   
203    public System.Data.Linq.Table<Characteristic> Characteristics
204    {
205      get
206      {
207        return this.GetTable<Characteristic>();
208      }
209    }
210   
211    public System.Data.Linq.Table<CharacteristicValue> CharacteristicValues
212    {
213      get
214      {
215        return this.GetTable<CharacteristicValue>();
216      }
217    }
218  }
219 
220  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.AlgorithmClass")]
221  public partial class AlgorithmClass : INotifyPropertyChanging, INotifyPropertyChanged
222  {
223   
224    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
225   
226    private long _Id;
227   
228    private string _Name;
229   
230    private string _Description;
231   
232    private EntitySet<Algorithm> _Algorithms;
233   
234    #region Extensibility Method Definitions
235    partial void OnLoaded();
236    partial void OnValidate(System.Data.Linq.ChangeAction action);
237    partial void OnCreated();
238    partial void OnIdChanging(long value);
239    partial void OnIdChanged();
240    partial void OnNameChanging(string value);
241    partial void OnNameChanged();
242    partial void OnDescriptionChanging(string value);
243    partial void OnDescriptionChanged();
244    #endregion
245   
246    public AlgorithmClass()
247    {
248      this._Algorithms = new EntitySet<Algorithm>(new Action<Algorithm>(this.attach_Algorithms), new Action<Algorithm>(this.detach_Algorithms));
249      OnCreated();
250    }
251   
252    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
253    public long Id
254    {
255      get
256      {
257        return this._Id;
258      }
259      set
260      {
261        if ((this._Id != value))
262        {
263          this.OnIdChanging(value);
264          this.SendPropertyChanging();
265          this._Id = value;
266          this.SendPropertyChanged("Id");
267          this.OnIdChanged();
268        }
269      }
270    }
271   
272    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
273    public string Name
274    {
275      get
276      {
277        return this._Name;
278      }
279      set
280      {
281        if ((this._Name != value))
282        {
283          this.OnNameChanging(value);
284          this.SendPropertyChanging();
285          this._Name = value;
286          this.SendPropertyChanged("Name");
287          this.OnNameChanged();
288        }
289      }
290    }
291   
292    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")]
293    public string Description
294    {
295      get
296      {
297        return this._Description;
298      }
299      set
300      {
301        if ((this._Description != value))
302        {
303          this.OnDescriptionChanging(value);
304          this.SendPropertyChanging();
305          this._Description = value;
306          this.SendPropertyChanged("Description");
307          this.OnDescriptionChanged();
308        }
309      }
310    }
311   
312    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="AlgorithmClass_Algorithm", Storage="_Algorithms", ThisKey="Id", OtherKey="AlgorithmClassId")]
313    public EntitySet<Algorithm> Algorithms
314    {
315      get
316      {
317        return this._Algorithms;
318      }
319      set
320      {
321        this._Algorithms.Assign(value);
322      }
323    }
324   
325    public event PropertyChangingEventHandler PropertyChanging;
326   
327    public event PropertyChangedEventHandler PropertyChanged;
328   
329    protected virtual void SendPropertyChanging()
330    {
331      if ((this.PropertyChanging != null))
332      {
333        this.PropertyChanging(this, emptyChangingEventArgs);
334      }
335    }
336   
337    protected virtual void SendPropertyChanged(String propertyName)
338    {
339      if ((this.PropertyChanged != null))
340      {
341        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
342      }
343    }
344   
345    private void attach_Algorithms(Algorithm entity)
346    {
347      this.SendPropertyChanging();
348      entity.AlgorithmClass = this;
349    }
350   
351    private void detach_Algorithms(Algorithm entity)
352    {
353      this.SendPropertyChanging();
354      entity.AlgorithmClass = null;
355    }
356  }
357 
358  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ProblemClass")]
359  public partial class ProblemClass : INotifyPropertyChanging, INotifyPropertyChanged
360  {
361   
362    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
363   
364    private long _Id;
365   
366    private string _Name;
367   
368    private string _Description;
369   
370    private EntitySet<Problem> _Problems;
371   
372    #region Extensibility Method Definitions
373    partial void OnLoaded();
374    partial void OnValidate(System.Data.Linq.ChangeAction action);
375    partial void OnCreated();
376    partial void OnIdChanging(long value);
377    partial void OnIdChanged();
378    partial void OnNameChanging(string value);
379    partial void OnNameChanged();
380    partial void OnDescriptionChanging(string value);
381    partial void OnDescriptionChanged();
382    #endregion
383   
384    public ProblemClass()
385    {
386      this._Problems = new EntitySet<Problem>(new Action<Problem>(this.attach_Problems), new Action<Problem>(this.detach_Problems));
387      OnCreated();
388    }
389   
390    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
391    public long Id
392    {
393      get
394      {
395        return this._Id;
396      }
397      set
398      {
399        if ((this._Id != value))
400        {
401          this.OnIdChanging(value);
402          this.SendPropertyChanging();
403          this._Id = value;
404          this.SendPropertyChanged("Id");
405          this.OnIdChanged();
406        }
407      }
408    }
409   
410    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
411    public string Name
412    {
413      get
414      {
415        return this._Name;
416      }
417      set
418      {
419        if ((this._Name != value))
420        {
421          this.OnNameChanging(value);
422          this.SendPropertyChanging();
423          this._Name = value;
424          this.SendPropertyChanged("Name");
425          this.OnNameChanged();
426        }
427      }
428    }
429   
430    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")]
431    public string Description
432    {
433      get
434      {
435        return this._Description;
436      }
437      set
438      {
439        if ((this._Description != value))
440        {
441          this.OnDescriptionChanging(value);
442          this.SendPropertyChanging();
443          this._Description = value;
444          this.SendPropertyChanged("Description");
445          this.OnDescriptionChanged();
446        }
447      }
448    }
449   
450    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="ProblemClass_Problem", Storage="_Problems", ThisKey="Id", OtherKey="ProblemClassId")]
451    public EntitySet<Problem> Problems
452    {
453      get
454      {
455        return this._Problems;
456      }
457      set
458      {
459        this._Problems.Assign(value);
460      }
461    }
462   
463    public event PropertyChangingEventHandler PropertyChanging;
464   
465    public event PropertyChangedEventHandler PropertyChanged;
466   
467    protected virtual void SendPropertyChanging()
468    {
469      if ((this.PropertyChanging != null))
470      {
471        this.PropertyChanging(this, emptyChangingEventArgs);
472      }
473    }
474   
475    protected virtual void SendPropertyChanged(String propertyName)
476    {
477      if ((this.PropertyChanged != null))
478      {
479        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
480      }
481    }
482   
483    private void attach_Problems(Problem entity)
484    {
485      this.SendPropertyChanging();
486      entity.ProblemClass = this;
487    }
488   
489    private void detach_Problems(Problem entity)
490    {
491      this.SendPropertyChanging();
492      entity.ProblemClass = null;
493    }
494  }
495 
496  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.AlgorithmUser")]
497  public partial class AlgorithmUser : INotifyPropertyChanging, INotifyPropertyChanged
498  {
499   
500    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
501   
502    private long _AlgorithmId;
503   
504    private System.Guid _UserId;
505   
506    private EntityRef<Algorithm> _Algorithm;
507   
508    #region Extensibility Method Definitions
509    partial void OnLoaded();
510    partial void OnValidate(System.Data.Linq.ChangeAction action);
511    partial void OnCreated();
512    partial void OnAlgorithmIdChanging(long value);
513    partial void OnAlgorithmIdChanged();
514    partial void OnUserIdChanging(System.Guid value);
515    partial void OnUserIdChanged();
516    #endregion
517   
518    public AlgorithmUser()
519    {
520      this._Algorithm = default(EntityRef<Algorithm>);
521      OnCreated();
522    }
523   
524    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AlgorithmId", DbType="BigInt NOT NULL", IsPrimaryKey=true)]
525    public long AlgorithmId
526    {
527      get
528      {
529        return this._AlgorithmId;
530      }
531      set
532      {
533        if ((this._AlgorithmId != value))
534        {
535          if (this._Algorithm.HasLoadedOrAssignedValue)
536          {
537            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
538          }
539          this.OnAlgorithmIdChanging(value);
540          this.SendPropertyChanging();
541          this._AlgorithmId = value;
542          this.SendPropertyChanged("AlgorithmId");
543          this.OnAlgorithmIdChanged();
544        }
545      }
546    }
547   
548    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
549    public System.Guid UserId
550    {
551      get
552      {
553        return this._UserId;
554      }
555      set
556      {
557        if ((this._UserId != value))
558        {
559          this.OnUserIdChanging(value);
560          this.SendPropertyChanging();
561          this._UserId = value;
562          this.SendPropertyChanged("UserId");
563          this.OnUserIdChanged();
564        }
565      }
566    }
567   
568    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Algorithm_AlgorithmUser", Storage="_Algorithm", ThisKey="AlgorithmId", OtherKey="Id", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
569    public Algorithm Algorithm
570    {
571      get
572      {
573        return this._Algorithm.Entity;
574      }
575      set
576      {
577        Algorithm previousValue = this._Algorithm.Entity;
578        if (((previousValue != value)
579              || (this._Algorithm.HasLoadedOrAssignedValue == false)))
580        {
581          this.SendPropertyChanging();
582          if ((previousValue != null))
583          {
584            this._Algorithm.Entity = null;
585            previousValue.AlgorithmUsers.Remove(this);
586          }
587          this._Algorithm.Entity = value;
588          if ((value != null))
589          {
590            value.AlgorithmUsers.Add(this);
591            this._AlgorithmId = value.Id;
592          }
593          else
594          {
595            this._AlgorithmId = default(long);
596          }
597          this.SendPropertyChanged("Algorithm");
598        }
599      }
600    }
601   
602    public event PropertyChangingEventHandler PropertyChanging;
603   
604    public event PropertyChangedEventHandler PropertyChanged;
605   
606    protected virtual void SendPropertyChanging()
607    {
608      if ((this.PropertyChanging != null))
609      {
610        this.PropertyChanging(this, emptyChangingEventArgs);
611      }
612    }
613   
614    protected virtual void SendPropertyChanged(String propertyName)
615    {
616      if ((this.PropertyChanged != null))
617      {
618        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
619      }
620    }
621  }
622 
623  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ProblemUser")]
624  public partial class ProblemUser : INotifyPropertyChanging, INotifyPropertyChanged
625  {
626   
627    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
628   
629    private long _ProblemId;
630   
631    private System.Guid _UserId;
632   
633    private EntityRef<Problem> _Problem;
634   
635    #region Extensibility Method Definitions
636    partial void OnLoaded();
637    partial void OnValidate(System.Data.Linq.ChangeAction action);
638    partial void OnCreated();
639    partial void OnProblemIdChanging(long value);
640    partial void OnProblemIdChanged();
641    partial void OnUserIdChanging(System.Guid value);
642    partial void OnUserIdChanged();
643    #endregion
644   
645    public ProblemUser()
646    {
647      this._Problem = default(EntityRef<Problem>);
648      OnCreated();
649    }
650   
651    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemId", DbType="BigInt NOT NULL", IsPrimaryKey=true)]
652    public long ProblemId
653    {
654      get
655      {
656        return this._ProblemId;
657      }
658      set
659      {
660        if ((this._ProblemId != value))
661        {
662          if (this._Problem.HasLoadedOrAssignedValue)
663          {
664            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
665          }
666          this.OnProblemIdChanging(value);
667          this.SendPropertyChanging();
668          this._ProblemId = value;
669          this.SendPropertyChanged("ProblemId");
670          this.OnProblemIdChanged();
671        }
672      }
673    }
674   
675    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
676    public System.Guid UserId
677    {
678      get
679      {
680        return this._UserId;
681      }
682      set
683      {
684        if ((this._UserId != value))
685        {
686          this.OnUserIdChanging(value);
687          this.SendPropertyChanging();
688          this._UserId = value;
689          this.SendPropertyChanged("UserId");
690          this.OnUserIdChanged();
691        }
692      }
693    }
694   
695    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_ProblemUser", Storage="_Problem", ThisKey="ProblemId", OtherKey="Id", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
696    public Problem Problem
697    {
698      get
699      {
700        return this._Problem.Entity;
701      }
702      set
703      {
704        Problem previousValue = this._Problem.Entity;
705        if (((previousValue != value)
706              || (this._Problem.HasLoadedOrAssignedValue == false)))
707        {
708          this.SendPropertyChanging();
709          if ((previousValue != null))
710          {
711            this._Problem.Entity = null;
712            previousValue.ProblemUsers.Remove(this);
713          }
714          this._Problem.Entity = value;
715          if ((value != null))
716          {
717            value.ProblemUsers.Add(this);
718            this._ProblemId = value.Id;
719          }
720          else
721          {
722            this._ProblemId = default(long);
723          }
724          this.SendPropertyChanged("Problem");
725        }
726      }
727    }
728   
729    public event PropertyChangingEventHandler PropertyChanging;
730   
731    public event PropertyChangedEventHandler PropertyChanged;
732   
733    protected virtual void SendPropertyChanging()
734    {
735      if ((this.PropertyChanging != null))
736      {
737        this.PropertyChanging(this, emptyChangingEventArgs);
738      }
739    }
740   
741    protected virtual void SendPropertyChanged(String propertyName)
742    {
743      if ((this.PropertyChanged != null))
744      {
745        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
746      }
747    }
748  }
749 
750  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Platform")]
751  public partial class Platform : INotifyPropertyChanging, INotifyPropertyChanged
752  {
753   
754    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
755   
756    private long _Id;
757   
758    private string _Name;
759   
760    private string _Description;
761   
762    private EntitySet<DataType> _DataTypes;
763   
764    private EntitySet<Algorithm> _Algorithms;
765   
766    private EntitySet<Problem> _Problems;
767   
768    #region Extensibility Method Definitions
769    partial void OnLoaded();
770    partial void OnValidate(System.Data.Linq.ChangeAction action);
771    partial void OnCreated();
772    partial void OnIdChanging(long value);
773    partial void OnIdChanged();
774    partial void OnNameChanging(string value);
775    partial void OnNameChanged();
776    partial void OnDescriptionChanging(string value);
777    partial void OnDescriptionChanged();
778    #endregion
779   
780    public Platform()
781    {
782      this._DataTypes = new EntitySet<DataType>(new Action<DataType>(this.attach_DataTypes), new Action<DataType>(this.detach_DataTypes));
783      this._Algorithms = new EntitySet<Algorithm>(new Action<Algorithm>(this.attach_Algorithms), new Action<Algorithm>(this.detach_Algorithms));
784      this._Problems = new EntitySet<Problem>(new Action<Problem>(this.attach_Problems), new Action<Problem>(this.detach_Problems));
785      OnCreated();
786    }
787   
788    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
789    public long Id
790    {
791      get
792      {
793        return this._Id;
794      }
795      set
796      {
797        if ((this._Id != value))
798        {
799          this.OnIdChanging(value);
800          this.SendPropertyChanging();
801          this._Id = value;
802          this.SendPropertyChanged("Id");
803          this.OnIdChanged();
804        }
805      }
806    }
807   
808    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
809    public string Name
810    {
811      get
812      {
813        return this._Name;
814      }
815      set
816      {
817        if ((this._Name != value))
818        {
819          this.OnNameChanging(value);
820          this.SendPropertyChanging();
821          this._Name = value;
822          this.SendPropertyChanged("Name");
823          this.OnNameChanged();
824        }
825      }
826    }
827   
828    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")]
829    public string Description
830    {
831      get
832      {
833        return this._Description;
834      }
835      set
836      {
837        if ((this._Description != value))
838        {
839          this.OnDescriptionChanging(value);
840          this.SendPropertyChanging();
841          this._Description = value;
842          this.SendPropertyChanged("Description");
843          this.OnDescriptionChanged();
844        }
845      }
846    }
847   
848    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_DataType", Storage="_DataTypes", ThisKey="Id", OtherKey="PlatformId")]
849    public EntitySet<DataType> DataTypes
850    {
851      get
852      {
853        return this._DataTypes;
854      }
855      set
856      {
857        this._DataTypes.Assign(value);
858      }
859    }
860   
861    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_Algorithm", Storage="_Algorithms", ThisKey="Id", OtherKey="PlatformId")]
862    public EntitySet<Algorithm> Algorithms
863    {
864      get
865      {
866        return this._Algorithms;
867      }
868      set
869      {
870        this._Algorithms.Assign(value);
871      }
872    }
873   
874    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_Problem", Storage="_Problems", ThisKey="Id", OtherKey="PlatformId")]
875    public EntitySet<Problem> Problems
876    {
877      get
878      {
879        return this._Problems;
880      }
881      set
882      {
883        this._Problems.Assign(value);
884      }
885    }
886   
887    public event PropertyChangingEventHandler PropertyChanging;
888   
889    public event PropertyChangedEventHandler PropertyChanged;
890   
891    protected virtual void SendPropertyChanging()
892    {
893      if ((this.PropertyChanging != null))
894      {
895        this.PropertyChanging(this, emptyChangingEventArgs);
896      }
897    }
898   
899    protected virtual void SendPropertyChanged(String propertyName)
900    {
901      if ((this.PropertyChanged != null))
902      {
903        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
904      }
905    }
906   
907    private void attach_DataTypes(DataType entity)
908    {
909      this.SendPropertyChanging();
910      entity.Platform = this;
911    }
912   
913    private void detach_DataTypes(DataType entity)
914    {
915      this.SendPropertyChanging();
916      entity.Platform = null;
917    }
918   
919    private void attach_Algorithms(Algorithm entity)
920    {
921      this.SendPropertyChanging();
922      entity.Platform = this;
923    }
924   
925    private void detach_Algorithms(Algorithm entity)
926    {
927      this.SendPropertyChanging();
928      entity.Platform = null;
929    }
930   
931    private void attach_Problems(Problem entity)
932    {
933      this.SendPropertyChanging();
934      entity.Platform = this;
935    }
936   
937    private void detach_Problems(Problem entity)
938    {
939      this.SendPropertyChanging();
940      entity.Platform = null;
941    }
942  }
943 
944  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.DataType")]
945  public partial class DataType : INotifyPropertyChanging, INotifyPropertyChanged
946  {
947   
948    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
949   
950    private long _Id;
951   
952    private long _PlatformId;
953   
954    private string _Name;
955   
956    private string _TypeName;
957   
958    private EntitySet<Algorithm> _Algorithms;
959   
960    private EntitySet<Problem> _Problems;
961   
962    private EntitySet<Value> _Values;
963   
964    private EntitySet<CharacteristicValue> _CharacteristicValues;
965   
966    private EntityRef<Platform> _Platform;
967   
968    #region Extensibility Method Definitions
969    partial void OnLoaded();
970    partial void OnValidate(System.Data.Linq.ChangeAction action);
971    partial void OnCreated();
972    partial void OnIdChanging(long value);
973    partial void OnIdChanged();
974    partial void OnPlatformIdChanging(long value);
975    partial void OnPlatformIdChanged();
976    partial void OnNameChanging(string value);
977    partial void OnNameChanged();
978    partial void OnTypeNameChanging(string value);
979    partial void OnTypeNameChanged();
980    #endregion
981   
982    public DataType()
983    {
984      this._Algorithms = new EntitySet<Algorithm>(new Action<Algorithm>(this.attach_Algorithms), new Action<Algorithm>(this.detach_Algorithms));
985      this._Problems = new EntitySet<Problem>(new Action<Problem>(this.attach_Problems), new Action<Problem>(this.detach_Problems));
986      this._Values = new EntitySet<Value>(new Action<Value>(this.attach_Values), new Action<Value>(this.detach_Values));
987      this._CharacteristicValues = new EntitySet<CharacteristicValue>(new Action<CharacteristicValue>(this.attach_CharacteristicValues), new Action<CharacteristicValue>(this.detach_CharacteristicValues));
988      this._Platform = default(EntityRef<Platform>);
989      OnCreated();
990    }
991   
992    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
993    public long Id
994    {
995      get
996      {
997        return this._Id;
998      }
999      set
1000      {
1001        if ((this._Id != value))
1002        {
1003          this.OnIdChanging(value);
1004          this.SendPropertyChanging();
1005          this._Id = value;
1006          this.SendPropertyChanged("Id");
1007          this.OnIdChanged();
1008        }
1009      }
1010    }
1011   
1012    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlatformId", DbType="BigInt NOT NULL")]
1013    public long PlatformId
1014    {
1015      get
1016      {
1017        return this._PlatformId;
1018      }
1019      set
1020      {
1021        if ((this._PlatformId != value))
1022        {
1023          if (this._Platform.HasLoadedOrAssignedValue)
1024          {
1025            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1026          }
1027          this.OnPlatformIdChanging(value);
1028          this.SendPropertyChanging();
1029          this._PlatformId = value;
1030          this.SendPropertyChanged("PlatformId");
1031          this.OnPlatformIdChanged();
1032        }
1033      }
1034    }
1035   
1036    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
1037    public string Name
1038    {
1039      get
1040      {
1041        return this._Name;
1042      }
1043      set
1044      {
1045        if ((this._Name != value))
1046        {
1047          this.OnNameChanging(value);
1048          this.SendPropertyChanging();
1049          this._Name = value;
1050          this.SendPropertyChanged("Name");
1051          this.OnNameChanged();
1052        }
1053      }
1054    }
1055   
1056    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeName", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
1057    public string TypeName
1058    {
1059      get
1060      {
1061        return this._TypeName;
1062      }
1063      set
1064      {
1065        if ((this._TypeName != value))
1066        {
1067          this.OnTypeNameChanging(value);
1068          this.SendPropertyChanging();
1069          this._TypeName = value;
1070          this.SendPropertyChanged("TypeName");
1071          this.OnTypeNameChanged();
1072        }
1073      }
1074    }
1075   
1076    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Algorithm", Storage="_Algorithms", ThisKey="Id", OtherKey="DataTypeId")]
1077    public EntitySet<Algorithm> Algorithms
1078    {
1079      get
1080      {
1081        return this._Algorithms;
1082      }
1083      set
1084      {
1085        this._Algorithms.Assign(value);
1086      }
1087    }
1088   
1089    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Problem", Storage="_Problems", ThisKey="Id", OtherKey="DataTypeId")]
1090    public EntitySet<Problem> Problems
1091    {
1092      get
1093      {
1094        return this._Problems;
1095      }
1096      set
1097      {
1098        this._Problems.Assign(value);
1099      }
1100    }
1101   
1102    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Value", Storage="_Values", ThisKey="Id", OtherKey="DataTypeId")]
1103    public EntitySet<Value> Values
1104    {
1105      get
1106      {
1107        return this._Values;
1108      }
1109      set
1110      {
1111        this._Values.Assign(value);
1112      }
1113    }
1114   
1115    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_CharacteristicValue", Storage="_CharacteristicValues", ThisKey="Id", OtherKey="DataTypeId")]
1116    public EntitySet<CharacteristicValue> CharacteristicValues
1117    {
1118      get
1119      {
1120        return this._CharacteristicValues;
1121      }
1122      set
1123      {
1124        this._CharacteristicValues.Assign(value);
1125      }
1126    }
1127   
1128    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_DataType", Storage="_Platform", ThisKey="PlatformId", OtherKey="Id", IsForeignKey=true)]
1129    public Platform Platform
1130    {
1131      get
1132      {
1133        return this._Platform.Entity;
1134      }
1135      set
1136      {
1137        Platform previousValue = this._Platform.Entity;
1138        if (((previousValue != value)
1139              || (this._Platform.HasLoadedOrAssignedValue == false)))
1140        {
1141          this.SendPropertyChanging();
1142          if ((previousValue != null))
1143          {
1144            this._Platform.Entity = null;
1145            previousValue.DataTypes.Remove(this);
1146          }
1147          this._Platform.Entity = value;
1148          if ((value != null))
1149          {
1150            value.DataTypes.Add(this);
1151            this._PlatformId = value.Id;
1152          }
1153          else
1154          {
1155            this._PlatformId = default(long);
1156          }
1157          this.SendPropertyChanged("Platform");
1158        }
1159      }
1160    }
1161   
1162    public event PropertyChangingEventHandler PropertyChanging;
1163   
1164    public event PropertyChangedEventHandler PropertyChanged;
1165   
1166    protected virtual void SendPropertyChanging()
1167    {
1168      if ((this.PropertyChanging != null))
1169      {
1170        this.PropertyChanging(this, emptyChangingEventArgs);
1171      }
1172    }
1173   
1174    protected virtual void SendPropertyChanged(String propertyName)
1175    {
1176      if ((this.PropertyChanged != null))
1177      {
1178        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
1179      }
1180    }
1181   
1182    private void attach_Algorithms(Algorithm entity)
1183    {
1184      this.SendPropertyChanging();
1185      entity.DataType = this;
1186    }
1187   
1188    private void detach_Algorithms(Algorithm entity)
1189    {
1190      this.SendPropertyChanging();
1191      entity.DataType = null;
1192    }
1193   
1194    private void attach_Problems(Problem entity)
1195    {
1196      this.SendPropertyChanging();
1197      entity.DataType = this;
1198    }
1199   
1200    private void detach_Problems(Problem entity)
1201    {
1202      this.SendPropertyChanging();
1203      entity.DataType = null;
1204    }
1205   
1206    private void attach_Values(Value entity)
1207    {
1208      this.SendPropertyChanging();
1209      entity.DataType = this;
1210    }
1211   
1212    private void detach_Values(Value entity)
1213    {
1214      this.SendPropertyChanging();
1215      entity.DataType = null;
1216    }
1217   
1218    private void attach_CharacteristicValues(CharacteristicValue entity)
1219    {
1220      this.SendPropertyChanging();
1221      entity.DataType = this;
1222    }
1223   
1224    private void detach_CharacteristicValues(CharacteristicValue entity)
1225    {
1226      this.SendPropertyChanging();
1227      entity.DataType = null;
1228    }
1229  }
1230 
1231  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ValueName")]
1232  public partial class ValueName : INotifyPropertyChanging, INotifyPropertyChanged
1233  {
1234   
1235    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
1236   
1237    private long _Id;
1238   
1239    private string _Name;
1240   
1241    private ValueNameCategory _Category;
1242   
1243    private ValueNameType _Type;
1244   
1245    private EntitySet<Value> _Values;
1246   
1247    #region Extensibility Method Definitions
1248    partial void OnLoaded();
1249    partial void OnValidate(System.Data.Linq.ChangeAction action);
1250    partial void OnCreated();
1251    partial void OnIdChanging(long value);
1252    partial void OnIdChanged();
1253    partial void OnNameChanging(string value);
1254    partial void OnNameChanged();
1255    partial void OnCategoryChanging(ValueNameCategory value);
1256    partial void OnCategoryChanged();
1257    partial void OnTypeChanging(ValueNameType value);
1258    partial void OnTypeChanged();
1259    #endregion
1260   
1261    public ValueName()
1262    {
1263      this._Values = new EntitySet<Value>(new Action<Value>(this.attach_Values), new Action<Value>(this.detach_Values));
1264      OnCreated();
1265    }
1266   
1267    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
1268    public long Id
1269    {
1270      get
1271      {
1272        return this._Id;
1273      }
1274      set
1275      {
1276        if ((this._Id != value))
1277        {
1278          this.OnIdChanging(value);
1279          this.SendPropertyChanging();
1280          this._Id = value;
1281          this.SendPropertyChanged("Id");
1282          this.OnIdChanged();
1283        }
1284      }
1285    }
1286   
1287    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
1288    public string Name
1289    {
1290      get
1291      {
1292        return this._Name;
1293      }
1294      set
1295      {
1296        if ((this._Name != value))
1297        {
1298          this.OnNameChanging(value);
1299          this.SendPropertyChanging();
1300          this._Name = value;
1301          this.SendPropertyChanged("Name");
1302          this.OnNameChanged();
1303        }
1304      }
1305    }
1306   
1307    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Category", DbType="TinyInt NOT NULL", CanBeNull=false)]
1308    public ValueNameCategory Category
1309    {
1310      get
1311      {
1312        return this._Category;
1313      }
1314      set
1315      {
1316        if ((this._Category != value))
1317        {
1318          this.OnCategoryChanging(value);
1319          this.SendPropertyChanging();
1320          this._Category = value;
1321          this.SendPropertyChanged("Category");
1322          this.OnCategoryChanged();
1323        }
1324      }
1325    }
1326   
1327    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="TinyInt NOT NULL", CanBeNull=false)]
1328    public ValueNameType Type
1329    {
1330      get
1331      {
1332        return this._Type;
1333      }
1334      set
1335      {
1336        if ((this._Type != value))
1337        {
1338          this.OnTypeChanging(value);
1339          this.SendPropertyChanging();
1340          this._Type = value;
1341          this.SendPropertyChanged("Type");
1342          this.OnTypeChanged();
1343        }
1344      }
1345    }
1346   
1347    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="ValueName_Value", Storage="_Values", ThisKey="Id", OtherKey="ValueNameId")]
1348    public EntitySet<Value> Values
1349    {
1350      get
1351      {
1352        return this._Values;
1353      }
1354      set
1355      {
1356        this._Values.Assign(value);
1357      }
1358    }
1359   
1360    public event PropertyChangingEventHandler PropertyChanging;
1361   
1362    public event PropertyChangedEventHandler PropertyChanged;
1363   
1364    protected virtual void SendPropertyChanging()
1365    {
1366      if ((this.PropertyChanging != null))
1367      {
1368        this.PropertyChanging(this, emptyChangingEventArgs);
1369      }
1370    }
1371   
1372    protected virtual void SendPropertyChanged(String propertyName)
1373    {
1374      if ((this.PropertyChanged != null))
1375      {
1376        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
1377      }
1378    }
1379   
1380    private void attach_Values(Value entity)
1381    {
1382      this.SendPropertyChanging();
1383      entity.ValueName = this;
1384    }
1385   
1386    private void detach_Values(Value entity)
1387    {
1388      this.SendPropertyChanging();
1389      entity.ValueName = null;
1390    }
1391  }
1392 
1393  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Algorithm")]
1394  public partial class Algorithm : INotifyPropertyChanging, INotifyPropertyChanged
1395  {
1396   
1397    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
1398   
1399    private long _Id;
1400   
1401    private long _AlgorithmClassId;
1402   
1403    private long _PlatformId;
1404   
1405    private long _DataTypeId;
1406   
1407    private long _BinaryDataId;
1408   
1409    private string _Name;
1410   
1411    private string _Description;
1412   
1413    private EntitySet<AlgorithmUser> _AlgorithmUsers;
1414   
1415    private EntitySet<Run> _Runs;
1416   
1417    private EntityRef<AlgorithmClass> _AlgorithmClass;
1418   
1419    private EntityRef<DataType> _DataType;
1420   
1421    private EntityRef<Platform> _Platform;
1422   
1423    private EntityRef<BinaryData> _BinaryData;
1424   
1425    #region Extensibility Method Definitions
1426    partial void OnLoaded();
1427    partial void OnValidate(System.Data.Linq.ChangeAction action);
1428    partial void OnCreated();
1429    partial void OnIdChanging(long value);
1430    partial void OnIdChanged();
1431    partial void OnAlgorithmClassIdChanging(long value);
1432    partial void OnAlgorithmClassIdChanged();
1433    partial void OnPlatformIdChanging(long value);
1434    partial void OnPlatformIdChanged();
1435    partial void OnDataTypeIdChanging(long value);
1436    partial void OnDataTypeIdChanged();
1437    partial void OnBinaryDataIdChanging(long value);
1438    partial void OnBinaryDataIdChanged();
1439    partial void OnNameChanging(string value);
1440    partial void OnNameChanged();
1441    partial void OnDescriptionChanging(string value);
1442    partial void OnDescriptionChanged();
1443    #endregion
1444   
1445    public Algorithm()
1446    {
1447      this._AlgorithmUsers = new EntitySet<AlgorithmUser>(new Action<AlgorithmUser>(this.attach_AlgorithmUsers), new Action<AlgorithmUser>(this.detach_AlgorithmUsers));
1448      this._Runs = new EntitySet<Run>(new Action<Run>(this.attach_Runs), new Action<Run>(this.detach_Runs));
1449      this._AlgorithmClass = default(EntityRef<AlgorithmClass>);
1450      this._DataType = default(EntityRef<DataType>);
1451      this._Platform = default(EntityRef<Platform>);
1452      this._BinaryData = default(EntityRef<BinaryData>);
1453      OnCreated();
1454    }
1455   
1456    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
1457    public long Id
1458    {
1459      get
1460      {
1461        return this._Id;
1462      }
1463      set
1464      {
1465        if ((this._Id != value))
1466        {
1467          this.OnIdChanging(value);
1468          this.SendPropertyChanging();
1469          this._Id = value;
1470          this.SendPropertyChanged("Id");
1471          this.OnIdChanged();
1472        }
1473      }
1474    }
1475   
1476    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AlgorithmClassId", DbType="BigInt NOT NULL")]
1477    public long AlgorithmClassId
1478    {
1479      get
1480      {
1481        return this._AlgorithmClassId;
1482      }
1483      set
1484      {
1485        if ((this._AlgorithmClassId != value))
1486        {
1487          if (this._AlgorithmClass.HasLoadedOrAssignedValue)
1488          {
1489            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1490          }
1491          this.OnAlgorithmClassIdChanging(value);
1492          this.SendPropertyChanging();
1493          this._AlgorithmClassId = value;
1494          this.SendPropertyChanged("AlgorithmClassId");
1495          this.OnAlgorithmClassIdChanged();
1496        }
1497      }
1498    }
1499   
1500    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlatformId", DbType="BigInt NOT NULL")]
1501    public long PlatformId
1502    {
1503      get
1504      {
1505        return this._PlatformId;
1506      }
1507      set
1508      {
1509        if ((this._PlatformId != value))
1510        {
1511          if (this._Platform.HasLoadedOrAssignedValue)
1512          {
1513            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1514          }
1515          this.OnPlatformIdChanging(value);
1516          this.SendPropertyChanging();
1517          this._PlatformId = value;
1518          this.SendPropertyChanged("PlatformId");
1519          this.OnPlatformIdChanged();
1520        }
1521      }
1522    }
1523   
1524    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataTypeId", DbType="BigInt NOT NULL")]
1525    public long DataTypeId
1526    {
1527      get
1528      {
1529        return this._DataTypeId;
1530      }
1531      set
1532      {
1533        if ((this._DataTypeId != value))
1534        {
1535          if (this._DataType.HasLoadedOrAssignedValue)
1536          {
1537            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1538          }
1539          this.OnDataTypeIdChanging(value);
1540          this.SendPropertyChanging();
1541          this._DataTypeId = value;
1542          this.SendPropertyChanged("DataTypeId");
1543          this.OnDataTypeIdChanged();
1544        }
1545      }
1546    }
1547   
1548    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt NOT NULL")]
1549    public long BinaryDataId
1550    {
1551      get
1552      {
1553        return this._BinaryDataId;
1554      }
1555      set
1556      {
1557        if ((this._BinaryDataId != value))
1558        {
1559          if (this._BinaryData.HasLoadedOrAssignedValue)
1560          {
1561            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1562          }
1563          this.OnBinaryDataIdChanging(value);
1564          this.SendPropertyChanging();
1565          this._BinaryDataId = value;
1566          this.SendPropertyChanged("BinaryDataId");
1567          this.OnBinaryDataIdChanged();
1568        }
1569      }
1570    }
1571   
1572    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
1573    public string Name
1574    {
1575      get
1576      {
1577        return this._Name;
1578      }
1579      set
1580      {
1581        if ((this._Name != value))
1582        {
1583          this.OnNameChanging(value);
1584          this.SendPropertyChanging();
1585          this._Name = value;
1586          this.SendPropertyChanged("Name");
1587          this.OnNameChanged();
1588        }
1589      }
1590    }
1591   
1592    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")]
1593    public string Description
1594    {
1595      get
1596      {
1597        return this._Description;
1598      }
1599      set
1600      {
1601        if ((this._Description != value))
1602        {
1603          this.OnDescriptionChanging(value);
1604          this.SendPropertyChanging();
1605          this._Description = value;
1606          this.SendPropertyChanged("Description");
1607          this.OnDescriptionChanged();
1608        }
1609      }
1610    }
1611   
1612    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Algorithm_AlgorithmUser", Storage="_AlgorithmUsers", ThisKey="Id", OtherKey="AlgorithmId")]
1613    public EntitySet<AlgorithmUser> AlgorithmUsers
1614    {
1615      get
1616      {
1617        return this._AlgorithmUsers;
1618      }
1619      set
1620      {
1621        this._AlgorithmUsers.Assign(value);
1622      }
1623    }
1624   
1625    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Algorithm_Run", Storage="_Runs", ThisKey="Id", OtherKey="AlgorithmId")]
1626    public EntitySet<Run> Runs
1627    {
1628      get
1629      {
1630        return this._Runs;
1631      }
1632      set
1633      {
1634        this._Runs.Assign(value);
1635      }
1636    }
1637   
1638    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="AlgorithmClass_Algorithm", Storage="_AlgorithmClass", ThisKey="AlgorithmClassId", OtherKey="Id", IsForeignKey=true)]
1639    public AlgorithmClass AlgorithmClass
1640    {
1641      get
1642      {
1643        return this._AlgorithmClass.Entity;
1644      }
1645      set
1646      {
1647        AlgorithmClass previousValue = this._AlgorithmClass.Entity;
1648        if (((previousValue != value)
1649              || (this._AlgorithmClass.HasLoadedOrAssignedValue == false)))
1650        {
1651          this.SendPropertyChanging();
1652          if ((previousValue != null))
1653          {
1654            this._AlgorithmClass.Entity = null;
1655            previousValue.Algorithms.Remove(this);
1656          }
1657          this._AlgorithmClass.Entity = value;
1658          if ((value != null))
1659          {
1660            value.Algorithms.Add(this);
1661            this._AlgorithmClassId = value.Id;
1662          }
1663          else
1664          {
1665            this._AlgorithmClassId = default(long);
1666          }
1667          this.SendPropertyChanged("AlgorithmClass");
1668        }
1669      }
1670    }
1671   
1672    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Algorithm", Storage="_DataType", ThisKey="DataTypeId", OtherKey="Id", IsForeignKey=true)]
1673    public DataType DataType
1674    {
1675      get
1676      {
1677        return this._DataType.Entity;
1678      }
1679      set
1680      {
1681        DataType previousValue = this._DataType.Entity;
1682        if (((previousValue != value)
1683              || (this._DataType.HasLoadedOrAssignedValue == false)))
1684        {
1685          this.SendPropertyChanging();
1686          if ((previousValue != null))
1687          {
1688            this._DataType.Entity = null;
1689            previousValue.Algorithms.Remove(this);
1690          }
1691          this._DataType.Entity = value;
1692          if ((value != null))
1693          {
1694            value.Algorithms.Add(this);
1695            this._DataTypeId = value.Id;
1696          }
1697          else
1698          {
1699            this._DataTypeId = default(long);
1700          }
1701          this.SendPropertyChanged("DataType");
1702        }
1703      }
1704    }
1705   
1706    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_Algorithm", Storage="_Platform", ThisKey="PlatformId", OtherKey="Id", IsForeignKey=true)]
1707    public Platform Platform
1708    {
1709      get
1710      {
1711        return this._Platform.Entity;
1712      }
1713      set
1714      {
1715        Platform previousValue = this._Platform.Entity;
1716        if (((previousValue != value)
1717              || (this._Platform.HasLoadedOrAssignedValue == false)))
1718        {
1719          this.SendPropertyChanging();
1720          if ((previousValue != null))
1721          {
1722            this._Platform.Entity = null;
1723            previousValue.Algorithms.Remove(this);
1724          }
1725          this._Platform.Entity = value;
1726          if ((value != null))
1727          {
1728            value.Algorithms.Add(this);
1729            this._PlatformId = value.Id;
1730          }
1731          else
1732          {
1733            this._PlatformId = default(long);
1734          }
1735          this.SendPropertyChanged("Platform");
1736        }
1737      }
1738    }
1739   
1740    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Algorithm", Storage="_BinaryData", ThisKey="BinaryDataId", OtherKey="Id", IsForeignKey=true)]
1741    public BinaryData BinaryData
1742    {
1743      get
1744      {
1745        return this._BinaryData.Entity;
1746      }
1747      set
1748      {
1749        BinaryData previousValue = this._BinaryData.Entity;
1750        if (((previousValue != value)
1751              || (this._BinaryData.HasLoadedOrAssignedValue == false)))
1752        {
1753          this.SendPropertyChanging();
1754          if ((previousValue != null))
1755          {
1756            this._BinaryData.Entity = null;
1757            previousValue.Algorithms.Remove(this);
1758          }
1759          this._BinaryData.Entity = value;
1760          if ((value != null))
1761          {
1762            value.Algorithms.Add(this);
1763            this._BinaryDataId = value.Id;
1764          }
1765          else
1766          {
1767            this._BinaryDataId = default(long);
1768          }
1769          this.SendPropertyChanged("BinaryData");
1770        }
1771      }
1772    }
1773   
1774    public event PropertyChangingEventHandler PropertyChanging;
1775   
1776    public event PropertyChangedEventHandler PropertyChanged;
1777   
1778    protected virtual void SendPropertyChanging()
1779    {
1780      if ((this.PropertyChanging != null))
1781      {
1782        this.PropertyChanging(this, emptyChangingEventArgs);
1783      }
1784    }
1785   
1786    protected virtual void SendPropertyChanged(String propertyName)
1787    {
1788      if ((this.PropertyChanged != null))
1789      {
1790        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
1791      }
1792    }
1793   
1794    private void attach_AlgorithmUsers(AlgorithmUser entity)
1795    {
1796      this.SendPropertyChanging();
1797      entity.Algorithm = this;
1798    }
1799   
1800    private void detach_AlgorithmUsers(AlgorithmUser entity)
1801    {
1802      this.SendPropertyChanging();
1803      entity.Algorithm = null;
1804    }
1805   
1806    private void attach_Runs(Run entity)
1807    {
1808      this.SendPropertyChanging();
1809      entity.Algorithm = this;
1810    }
1811   
1812    private void detach_Runs(Run entity)
1813    {
1814      this.SendPropertyChanging();
1815      entity.Algorithm = null;
1816    }
1817  }
1818 
1819  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Problem")]
1820  public partial class Problem : INotifyPropertyChanging, INotifyPropertyChanged
1821  {
1822   
1823    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
1824   
1825    private long _Id;
1826   
1827    private long _ProblemClassId;
1828   
1829    private long _PlatformId;
1830   
1831    private long _DataTypeId;
1832   
1833    private long _BinaryDataId;
1834   
1835    private string _Name;
1836   
1837    private string _Description;
1838   
1839    private EntitySet<ProblemUser> _ProblemUsers;
1840   
1841    private EntitySet<Run> _Runs;
1842   
1843    private EntitySet<CharacteristicValue> _CharacteristicValues;
1844   
1845    private EntityRef<DataType> _DataType;
1846   
1847    private EntityRef<Platform> _Platform;
1848   
1849    private EntityRef<ProblemClass> _ProblemClass;
1850   
1851    private EntityRef<BinaryData> _BinaryData;
1852   
1853    #region Extensibility Method Definitions
1854    partial void OnLoaded();
1855    partial void OnValidate(System.Data.Linq.ChangeAction action);
1856    partial void OnCreated();
1857    partial void OnIdChanging(long value);
1858    partial void OnIdChanged();
1859    partial void OnProblemClassIdChanging(long value);
1860    partial void OnProblemClassIdChanged();
1861    partial void OnPlatformIdChanging(long value);
1862    partial void OnPlatformIdChanged();
1863    partial void OnDataTypeIdChanging(long value);
1864    partial void OnDataTypeIdChanged();
1865    partial void OnBinaryDataIdChanging(long value);
1866    partial void OnBinaryDataIdChanged();
1867    partial void OnNameChanging(string value);
1868    partial void OnNameChanged();
1869    partial void OnDescriptionChanging(string value);
1870    partial void OnDescriptionChanged();
1871    #endregion
1872   
1873    public Problem()
1874    {
1875      this._ProblemUsers = new EntitySet<ProblemUser>(new Action<ProblemUser>(this.attach_ProblemUsers), new Action<ProblemUser>(this.detach_ProblemUsers));
1876      this._Runs = new EntitySet<Run>(new Action<Run>(this.attach_Runs), new Action<Run>(this.detach_Runs));
1877      this._CharacteristicValues = new EntitySet<CharacteristicValue>(new Action<CharacteristicValue>(this.attach_CharacteristicValues), new Action<CharacteristicValue>(this.detach_CharacteristicValues));
1878      this._DataType = default(EntityRef<DataType>);
1879      this._Platform = default(EntityRef<Platform>);
1880      this._ProblemClass = default(EntityRef<ProblemClass>);
1881      this._BinaryData = default(EntityRef<BinaryData>);
1882      OnCreated();
1883    }
1884   
1885    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
1886    public long Id
1887    {
1888      get
1889      {
1890        return this._Id;
1891      }
1892      set
1893      {
1894        if ((this._Id != value))
1895        {
1896          this.OnIdChanging(value);
1897          this.SendPropertyChanging();
1898          this._Id = value;
1899          this.SendPropertyChanged("Id");
1900          this.OnIdChanged();
1901        }
1902      }
1903    }
1904   
1905    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemClassId", DbType="BigInt NOT NULL")]
1906    public long ProblemClassId
1907    {
1908      get
1909      {
1910        return this._ProblemClassId;
1911      }
1912      set
1913      {
1914        if ((this._ProblemClassId != value))
1915        {
1916          if (this._ProblemClass.HasLoadedOrAssignedValue)
1917          {
1918            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1919          }
1920          this.OnProblemClassIdChanging(value);
1921          this.SendPropertyChanging();
1922          this._ProblemClassId = value;
1923          this.SendPropertyChanged("ProblemClassId");
1924          this.OnProblemClassIdChanged();
1925        }
1926      }
1927    }
1928   
1929    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlatformId", DbType="BigInt NOT NULL")]
1930    public long PlatformId
1931    {
1932      get
1933      {
1934        return this._PlatformId;
1935      }
1936      set
1937      {
1938        if ((this._PlatformId != value))
1939        {
1940          if (this._Platform.HasLoadedOrAssignedValue)
1941          {
1942            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1943          }
1944          this.OnPlatformIdChanging(value);
1945          this.SendPropertyChanging();
1946          this._PlatformId = value;
1947          this.SendPropertyChanged("PlatformId");
1948          this.OnPlatformIdChanged();
1949        }
1950      }
1951    }
1952   
1953    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataTypeId", DbType="BigInt NOT NULL")]
1954    public long DataTypeId
1955    {
1956      get
1957      {
1958        return this._DataTypeId;
1959      }
1960      set
1961      {
1962        if ((this._DataTypeId != value))
1963        {
1964          if (this._DataType.HasLoadedOrAssignedValue)
1965          {
1966            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1967          }
1968          this.OnDataTypeIdChanging(value);
1969          this.SendPropertyChanging();
1970          this._DataTypeId = value;
1971          this.SendPropertyChanged("DataTypeId");
1972          this.OnDataTypeIdChanged();
1973        }
1974      }
1975    }
1976   
1977    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt NOT NULL")]
1978    public long BinaryDataId
1979    {
1980      get
1981      {
1982        return this._BinaryDataId;
1983      }
1984      set
1985      {
1986        if ((this._BinaryDataId != value))
1987        {
1988          if (this._BinaryData.HasLoadedOrAssignedValue)
1989          {
1990            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1991          }
1992          this.OnBinaryDataIdChanging(value);
1993          this.SendPropertyChanging();
1994          this._BinaryDataId = value;
1995          this.SendPropertyChanged("BinaryDataId");
1996          this.OnBinaryDataIdChanged();
1997        }
1998      }
1999    }
2000   
2001    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
2002    public string Name
2003    {
2004      get
2005      {
2006        return this._Name;
2007      }
2008      set
2009      {
2010        if ((this._Name != value))
2011        {
2012          this.OnNameChanging(value);
2013          this.SendPropertyChanging();
2014          this._Name = value;
2015          this.SendPropertyChanged("Name");
2016          this.OnNameChanged();
2017        }
2018      }
2019    }
2020   
2021    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")]
2022    public string Description
2023    {
2024      get
2025      {
2026        return this._Description;
2027      }
2028      set
2029      {
2030        if ((this._Description != value))
2031        {
2032          this.OnDescriptionChanging(value);
2033          this.SendPropertyChanging();
2034          this._Description = value;
2035          this.SendPropertyChanged("Description");
2036          this.OnDescriptionChanged();
2037        }
2038      }
2039    }
2040   
2041    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_ProblemUser", Storage="_ProblemUsers", ThisKey="Id", OtherKey="ProblemId")]
2042    public EntitySet<ProblemUser> ProblemUsers
2043    {
2044      get
2045      {
2046        return this._ProblemUsers;
2047      }
2048      set
2049      {
2050        this._ProblemUsers.Assign(value);
2051      }
2052    }
2053   
2054    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_Run", Storage="_Runs", ThisKey="Id", OtherKey="ProblemId")]
2055    public EntitySet<Run> Runs
2056    {
2057      get
2058      {
2059        return this._Runs;
2060      }
2061      set
2062      {
2063        this._Runs.Assign(value);
2064      }
2065    }
2066   
2067    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_CharacteristicValue", Storage="_CharacteristicValues", ThisKey="Id", OtherKey="ProblemId")]
2068    public EntitySet<CharacteristicValue> CharacteristicValues
2069    {
2070      get
2071      {
2072        return this._CharacteristicValues;
2073      }
2074      set
2075      {
2076        this._CharacteristicValues.Assign(value);
2077      }
2078    }
2079   
2080    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Problem", Storage="_DataType", ThisKey="DataTypeId", OtherKey="Id", IsForeignKey=true)]
2081    public DataType DataType
2082    {
2083      get
2084      {
2085        return this._DataType.Entity;
2086      }
2087      set
2088      {
2089        DataType previousValue = this._DataType.Entity;
2090        if (((previousValue != value)
2091              || (this._DataType.HasLoadedOrAssignedValue == false)))
2092        {
2093          this.SendPropertyChanging();
2094          if ((previousValue != null))
2095          {
2096            this._DataType.Entity = null;
2097            previousValue.Problems.Remove(this);
2098          }
2099          this._DataType.Entity = value;
2100          if ((value != null))
2101          {
2102            value.Problems.Add(this);
2103            this._DataTypeId = value.Id;
2104          }
2105          else
2106          {
2107            this._DataTypeId = default(long);
2108          }
2109          this.SendPropertyChanged("DataType");
2110        }
2111      }
2112    }
2113   
2114    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_Problem", Storage="_Platform", ThisKey="PlatformId", OtherKey="Id", IsForeignKey=true)]
2115    public Platform Platform
2116    {
2117      get
2118      {
2119        return this._Platform.Entity;
2120      }
2121      set
2122      {
2123        Platform previousValue = this._Platform.Entity;
2124        if (((previousValue != value)
2125              || (this._Platform.HasLoadedOrAssignedValue == false)))
2126        {
2127          this.SendPropertyChanging();
2128          if ((previousValue != null))
2129          {
2130            this._Platform.Entity = null;
2131            previousValue.Problems.Remove(this);
2132          }
2133          this._Platform.Entity = value;
2134          if ((value != null))
2135          {
2136            value.Problems.Add(this);
2137            this._PlatformId = value.Id;
2138          }
2139          else
2140          {
2141            this._PlatformId = default(long);
2142          }
2143          this.SendPropertyChanged("Platform");
2144        }
2145      }
2146    }
2147   
2148    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="ProblemClass_Problem", Storage="_ProblemClass", ThisKey="ProblemClassId", OtherKey="Id", IsForeignKey=true)]
2149    public ProblemClass ProblemClass
2150    {
2151      get
2152      {
2153        return this._ProblemClass.Entity;
2154      }
2155      set
2156      {
2157        ProblemClass previousValue = this._ProblemClass.Entity;
2158        if (((previousValue != value)
2159              || (this._ProblemClass.HasLoadedOrAssignedValue == false)))
2160        {
2161          this.SendPropertyChanging();
2162          if ((previousValue != null))
2163          {
2164            this._ProblemClass.Entity = null;
2165            previousValue.Problems.Remove(this);
2166          }
2167          this._ProblemClass.Entity = value;
2168          if ((value != null))
2169          {
2170            value.Problems.Add(this);
2171            this._ProblemClassId = value.Id;
2172          }
2173          else
2174          {
2175            this._ProblemClassId = default(long);
2176          }
2177          this.SendPropertyChanged("ProblemClass");
2178        }
2179      }
2180    }
2181   
2182    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Problem", Storage="_BinaryData", ThisKey="BinaryDataId", OtherKey="Id", IsForeignKey=true)]
2183    public BinaryData BinaryData
2184    {
2185      get
2186      {
2187        return this._BinaryData.Entity;
2188      }
2189      set
2190      {
2191        BinaryData previousValue = this._BinaryData.Entity;
2192        if (((previousValue != value)
2193              || (this._BinaryData.HasLoadedOrAssignedValue == false)))
2194        {
2195          this.SendPropertyChanging();
2196          if ((previousValue != null))
2197          {
2198            this._BinaryData.Entity = null;
2199            previousValue.Problems.Remove(this);
2200          }
2201          this._BinaryData.Entity = value;
2202          if ((value != null))
2203          {
2204            value.Problems.Add(this);
2205            this._BinaryDataId = value.Id;
2206          }
2207          else
2208          {
2209            this._BinaryDataId = default(long);
2210          }
2211          this.SendPropertyChanged("BinaryData");
2212        }
2213      }
2214    }
2215   
2216    public event PropertyChangingEventHandler PropertyChanging;
2217   
2218    public event PropertyChangedEventHandler PropertyChanged;
2219   
2220    protected virtual void SendPropertyChanging()
2221    {
2222      if ((this.PropertyChanging != null))
2223      {
2224        this.PropertyChanging(this, emptyChangingEventArgs);
2225      }
2226    }
2227   
2228    protected virtual void SendPropertyChanged(String propertyName)
2229    {
2230      if ((this.PropertyChanged != null))
2231      {
2232        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2233      }
2234    }
2235   
2236    private void attach_ProblemUsers(ProblemUser entity)
2237    {
2238      this.SendPropertyChanging();
2239      entity.Problem = this;
2240    }
2241   
2242    private void detach_ProblemUsers(ProblemUser entity)
2243    {
2244      this.SendPropertyChanging();
2245      entity.Problem = null;
2246    }
2247   
2248    private void attach_Runs(Run entity)
2249    {
2250      this.SendPropertyChanging();
2251      entity.Problem = this;
2252    }
2253   
2254    private void detach_Runs(Run entity)
2255    {
2256      this.SendPropertyChanging();
2257      entity.Problem = null;
2258    }
2259   
2260    private void attach_CharacteristicValues(CharacteristicValue entity)
2261    {
2262      this.SendPropertyChanging();
2263      entity.Problem = this;
2264    }
2265   
2266    private void detach_CharacteristicValues(CharacteristicValue entity)
2267    {
2268      this.SendPropertyChanging();
2269      entity.Problem = null;
2270    }
2271  }
2272 
2273  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.BinaryData")]
2274  public partial class BinaryData : INotifyPropertyChanging, INotifyPropertyChanged
2275  {
2276   
2277    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2278   
2279    private long _Id;
2280   
2281    private System.Data.Linq.Binary _Data;
2282   
2283    private System.Data.Linq.Binary _Hash;
2284   
2285    private EntitySet<Algorithm> _Algorithms;
2286   
2287    private EntitySet<Problem> _Problems;
2288   
2289    private EntitySet<Value> _Values;
2290   
2291    #region Extensibility Method Definitions
2292    partial void OnLoaded();
2293    partial void OnValidate(System.Data.Linq.ChangeAction action);
2294    partial void OnCreated();
2295    partial void OnIdChanging(long value);
2296    partial void OnIdChanged();
2297    partial void OnDataChanging(System.Data.Linq.Binary value);
2298    partial void OnDataChanged();
2299    partial void OnHashChanging(System.Data.Linq.Binary value);
2300    partial void OnHashChanged();
2301    #endregion
2302   
2303    public BinaryData()
2304    {
2305      this._Algorithms = new EntitySet<Algorithm>(new Action<Algorithm>(this.attach_Algorithms), new Action<Algorithm>(this.detach_Algorithms));
2306      this._Problems = new EntitySet<Problem>(new Action<Problem>(this.attach_Problems), new Action<Problem>(this.detach_Problems));
2307      this._Values = new EntitySet<Value>(new Action<Value>(this.attach_Values), new Action<Value>(this.detach_Values));
2308      OnCreated();
2309    }
2310   
2311    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
2312    public long Id
2313    {
2314      get
2315      {
2316        return this._Id;
2317      }
2318      set
2319      {
2320        if ((this._Id != value))
2321        {
2322          this.OnIdChanging(value);
2323          this.SendPropertyChanging();
2324          this._Id = value;
2325          this.SendPropertyChanged("Id");
2326          this.OnIdChanged();
2327        }
2328      }
2329    }
2330   
2331    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX) NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2332    public System.Data.Linq.Binary Data
2333    {
2334      get
2335      {
2336        return this._Data;
2337      }
2338      set
2339      {
2340        if ((this._Data != value))
2341        {
2342          this.OnDataChanging(value);
2343          this.SendPropertyChanging();
2344          this._Data = value;
2345          this.SendPropertyChanged("Data");
2346          this.OnDataChanged();
2347        }
2348      }
2349    }
2350   
2351    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Hash", AutoSync=AutoSync.Always, DbType="VarBinary(20)", IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
2352    public System.Data.Linq.Binary Hash
2353    {
2354      get
2355      {
2356        return this._Hash;
2357      }
2358      set
2359      {
2360        if ((this._Hash != value))
2361        {
2362          this.OnHashChanging(value);
2363          this.SendPropertyChanging();
2364          this._Hash = value;
2365          this.SendPropertyChanged("Hash");
2366          this.OnHashChanged();
2367        }
2368      }
2369    }
2370   
2371    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Algorithm", Storage="_Algorithms", ThisKey="Id", OtherKey="BinaryDataId")]
2372    public EntitySet<Algorithm> Algorithms
2373    {
2374      get
2375      {
2376        return this._Algorithms;
2377      }
2378      set
2379      {
2380        this._Algorithms.Assign(value);
2381      }
2382    }
2383   
2384    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Problem", Storage="_Problems", ThisKey="Id", OtherKey="BinaryDataId")]
2385    public EntitySet<Problem> Problems
2386    {
2387      get
2388      {
2389        return this._Problems;
2390      }
2391      set
2392      {
2393        this._Problems.Assign(value);
2394      }
2395    }
2396   
2397    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Value", Storage="_Values", ThisKey="Id", OtherKey="BinaryDataId")]
2398    public EntitySet<Value> Values
2399    {
2400      get
2401      {
2402        return this._Values;
2403      }
2404      set
2405      {
2406        this._Values.Assign(value);
2407      }
2408    }
2409   
2410    public event PropertyChangingEventHandler PropertyChanging;
2411   
2412    public event PropertyChangedEventHandler PropertyChanged;
2413   
2414    protected virtual void SendPropertyChanging()
2415    {
2416      if ((this.PropertyChanging != null))
2417      {
2418        this.PropertyChanging(this, emptyChangingEventArgs);
2419      }
2420    }
2421   
2422    protected virtual void SendPropertyChanged(String propertyName)
2423    {
2424      if ((this.PropertyChanged != null))
2425      {
2426        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2427      }
2428    }
2429   
2430    private void attach_Algorithms(Algorithm entity)
2431    {
2432      this.SendPropertyChanging();
2433      entity.BinaryData = this;
2434    }
2435   
2436    private void detach_Algorithms(Algorithm entity)
2437    {
2438      this.SendPropertyChanging();
2439      entity.BinaryData = null;
2440    }
2441   
2442    private void attach_Problems(Problem entity)
2443    {
2444      this.SendPropertyChanging();
2445      entity.BinaryData = this;
2446    }
2447   
2448    private void detach_Problems(Problem entity)
2449    {
2450      this.SendPropertyChanging();
2451      entity.BinaryData = null;
2452    }
2453   
2454    private void attach_Values(Value entity)
2455    {
2456      this.SendPropertyChanging();
2457      entity.BinaryData = this;
2458    }
2459   
2460    private void detach_Values(Value entity)
2461    {
2462      this.SendPropertyChanging();
2463      entity.BinaryData = null;
2464    }
2465  }
2466 
2467  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Run")]
2468  public partial class Run : INotifyPropertyChanging, INotifyPropertyChanged
2469  {
2470   
2471    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2472   
2473    private long _Id;
2474   
2475    private long _AlgorithmId;
2476   
2477    private long _ProblemId;
2478   
2479    private int _RandomSeed;
2480   
2481    private System.DateTime _CreatedDate;
2482   
2483    private System.Guid _UserId;
2484   
2485    private System.Guid _ClientId;
2486   
2487    private EntitySet<Value> _Values;
2488   
2489    private EntityRef<Algorithm> _Algorithm;
2490   
2491    private EntityRef<Problem> _Problem;
2492   
2493    #region Extensibility Method Definitions
2494    partial void OnLoaded();
2495    partial void OnValidate(System.Data.Linq.ChangeAction action);
2496    partial void OnCreated();
2497    partial void OnIdChanging(long value);
2498    partial void OnIdChanged();
2499    partial void OnAlgorithmIdChanging(long value);
2500    partial void OnAlgorithmIdChanged();
2501    partial void OnProblemIdChanging(long value);
2502    partial void OnProblemIdChanged();
2503    partial void OnRandomSeedChanging(int value);
2504    partial void OnRandomSeedChanged();
2505    partial void OnCreatedDateChanging(System.DateTime value);
2506    partial void OnCreatedDateChanged();
2507    partial void OnUserIdChanging(System.Guid value);
2508    partial void OnUserIdChanged();
2509    partial void OnClientIdChanging(System.Guid value);
2510    partial void OnClientIdChanged();
2511    #endregion
2512   
2513    public Run()
2514    {
2515      this._Values = new EntitySet<Value>(new Action<Value>(this.attach_Values), new Action<Value>(this.detach_Values));
2516      this._Algorithm = default(EntityRef<Algorithm>);
2517      this._Problem = default(EntityRef<Problem>);
2518      OnCreated();
2519    }
2520   
2521    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
2522    public long Id
2523    {
2524      get
2525      {
2526        return this._Id;
2527      }
2528      set
2529      {
2530        if ((this._Id != value))
2531        {
2532          this.OnIdChanging(value);
2533          this.SendPropertyChanging();
2534          this._Id = value;
2535          this.SendPropertyChanged("Id");
2536          this.OnIdChanged();
2537        }
2538      }
2539    }
2540   
2541    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AlgorithmId", DbType="BigInt NOT NULL")]
2542    public long AlgorithmId
2543    {
2544      get
2545      {
2546        return this._AlgorithmId;
2547      }
2548      set
2549      {
2550        if ((this._AlgorithmId != value))
2551        {
2552          if (this._Algorithm.HasLoadedOrAssignedValue)
2553          {
2554            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2555          }
2556          this.OnAlgorithmIdChanging(value);
2557          this.SendPropertyChanging();
2558          this._AlgorithmId = value;
2559          this.SendPropertyChanged("AlgorithmId");
2560          this.OnAlgorithmIdChanged();
2561        }
2562      }
2563    }
2564   
2565    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemId", DbType="BigInt NOT NULL")]
2566    public long ProblemId
2567    {
2568      get
2569      {
2570        return this._ProblemId;
2571      }
2572      set
2573      {
2574        if ((this._ProblemId != value))
2575        {
2576          if (this._Problem.HasLoadedOrAssignedValue)
2577          {
2578            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2579          }
2580          this.OnProblemIdChanging(value);
2581          this.SendPropertyChanging();
2582          this._ProblemId = value;
2583          this.SendPropertyChanged("ProblemId");
2584          this.OnProblemIdChanged();
2585        }
2586      }
2587    }
2588   
2589    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RandomSeed", DbType="Int NOT NULL")]
2590    public int RandomSeed
2591    {
2592      get
2593      {
2594        return this._RandomSeed;
2595      }
2596      set
2597      {
2598        if ((this._RandomSeed != value))
2599        {
2600          this.OnRandomSeedChanging(value);
2601          this.SendPropertyChanging();
2602          this._RandomSeed = value;
2603          this.SendPropertyChanged("RandomSeed");
2604          this.OnRandomSeedChanged();
2605        }
2606      }
2607    }
2608   
2609    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreatedDate", DbType="DateTime2 NOT NULL")]
2610    public System.DateTime CreatedDate
2611    {
2612      get
2613      {
2614        return this._CreatedDate;
2615      }
2616      set
2617      {
2618        if ((this._CreatedDate != value))
2619        {
2620          this.OnCreatedDateChanging(value);
2621          this.SendPropertyChanging();
2622          this._CreatedDate = value;
2623          this.SendPropertyChanged("CreatedDate");
2624          this.OnCreatedDateChanged();
2625        }
2626      }
2627    }
2628   
2629    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL")]
2630    public System.Guid UserId
2631    {
2632      get
2633      {
2634        return this._UserId;
2635      }
2636      set
2637      {
2638        if ((this._UserId != value))
2639        {
2640          this.OnUserIdChanging(value);
2641          this.SendPropertyChanging();
2642          this._UserId = value;
2643          this.SendPropertyChanged("UserId");
2644          this.OnUserIdChanged();
2645        }
2646      }
2647    }
2648   
2649    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClientId", DbType="UniqueIdentifier NOT NULL")]
2650    public System.Guid ClientId
2651    {
2652      get
2653      {
2654        return this._ClientId;
2655      }
2656      set
2657      {
2658        if ((this._ClientId != value))
2659        {
2660          this.OnClientIdChanging(value);
2661          this.SendPropertyChanging();
2662          this._ClientId = value;
2663          this.SendPropertyChanged("ClientId");
2664          this.OnClientIdChanged();
2665        }
2666      }
2667    }
2668   
2669    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Run_Value", Storage="_Values", ThisKey="Id", OtherKey="RunId")]
2670    public EntitySet<Value> Values
2671    {
2672      get
2673      {
2674        return this._Values;
2675      }
2676      set
2677      {
2678        this._Values.Assign(value);
2679      }
2680    }
2681   
2682    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Algorithm_Run", Storage="_Algorithm", ThisKey="AlgorithmId", OtherKey="Id", IsForeignKey=true)]
2683    public Algorithm Algorithm
2684    {
2685      get
2686      {
2687        return this._Algorithm.Entity;
2688      }
2689      set
2690      {
2691        Algorithm previousValue = this._Algorithm.Entity;
2692        if (((previousValue != value)
2693              || (this._Algorithm.HasLoadedOrAssignedValue == false)))
2694        {
2695          this.SendPropertyChanging();
2696          if ((previousValue != null))
2697          {
2698            this._Algorithm.Entity = null;
2699            previousValue.Runs.Remove(this);
2700          }
2701          this._Algorithm.Entity = value;
2702          if ((value != null))
2703          {
2704            value.Runs.Add(this);
2705            this._AlgorithmId = value.Id;
2706          }
2707          else
2708          {
2709            this._AlgorithmId = default(long);
2710          }
2711          this.SendPropertyChanged("Algorithm");
2712        }
2713      }
2714    }
2715   
2716    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_Run", Storage="_Problem", ThisKey="ProblemId", OtherKey="Id", IsForeignKey=true)]
2717    public Problem Problem
2718    {
2719      get
2720      {
2721        return this._Problem.Entity;
2722      }
2723      set
2724      {
2725        Problem previousValue = this._Problem.Entity;
2726        if (((previousValue != value)
2727              || (this._Problem.HasLoadedOrAssignedValue == false)))
2728        {
2729          this.SendPropertyChanging();
2730          if ((previousValue != null))
2731          {
2732            this._Problem.Entity = null;
2733            previousValue.Runs.Remove(this);
2734          }
2735          this._Problem.Entity = value;
2736          if ((value != null))
2737          {
2738            value.Runs.Add(this);
2739            this._ProblemId = value.Id;
2740          }
2741          else
2742          {
2743            this._ProblemId = default(long);
2744          }
2745          this.SendPropertyChanged("Problem");
2746        }
2747      }
2748    }
2749   
2750    public event PropertyChangingEventHandler PropertyChanging;
2751   
2752    public event PropertyChangedEventHandler PropertyChanged;
2753   
2754    protected virtual void SendPropertyChanging()
2755    {
2756      if ((this.PropertyChanging != null))
2757      {
2758        this.PropertyChanging(this, emptyChangingEventArgs);
2759      }
2760    }
2761   
2762    protected virtual void SendPropertyChanged(String propertyName)
2763    {
2764      if ((this.PropertyChanged != null))
2765      {
2766        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2767      }
2768    }
2769   
2770    private void attach_Values(Value entity)
2771    {
2772      this.SendPropertyChanging();
2773      entity.Run = this;
2774    }
2775   
2776    private void detach_Values(Value entity)
2777    {
2778      this.SendPropertyChanging();
2779      entity.Run = null;
2780    }
2781  }
2782 
2783  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Value")]
2784  public partial class Value : INotifyPropertyChanging, INotifyPropertyChanged
2785  {
2786   
2787    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2788   
2789    private long _Id;
2790   
2791    private long _RunId;
2792   
2793    private long _ValueNameId;
2794   
2795    private long _DataTypeId;
2796   
2797    private System.Nullable<bool> _BoolValue;
2798   
2799    private System.Nullable<int> _IntValue;
2800   
2801    private System.Nullable<long> _LongValue;
2802   
2803    private System.Nullable<float> _FloatValue;
2804   
2805    private System.Nullable<double> _DoubleValue;
2806   
2807    private string _StringValue;
2808   
2809    private System.Nullable<long> _BinaryDataId;
2810   
2811    private EntityRef<BinaryData> _BinaryData;
2812   
2813    private EntityRef<DataType> _DataType;
2814   
2815    private EntityRef<Run> _Run;
2816   
2817    private EntityRef<ValueName> _ValueName;
2818   
2819    #region Extensibility Method Definitions
2820    partial void OnLoaded();
2821    partial void OnValidate(System.Data.Linq.ChangeAction action);
2822    partial void OnCreated();
2823    partial void OnIdChanging(long value);
2824    partial void OnIdChanged();
2825    partial void OnRunIdChanging(long value);
2826    partial void OnRunIdChanged();
2827    partial void OnValueNameIdChanging(long value);
2828    partial void OnValueNameIdChanged();
2829    partial void OnDataTypeIdChanging(long value);
2830    partial void OnDataTypeIdChanged();
2831    partial void OnBoolValueChanging(System.Nullable<bool> value);
2832    partial void OnBoolValueChanged();
2833    partial void OnIntValueChanging(System.Nullable<int> value);
2834    partial void OnIntValueChanged();
2835    partial void OnLongValueChanging(System.Nullable<long> value);
2836    partial void OnLongValueChanged();
2837    partial void OnFloatValueChanging(System.Nullable<float> value);
2838    partial void OnFloatValueChanged();
2839    partial void OnDoubleValueChanging(System.Nullable<double> value);
2840    partial void OnDoubleValueChanged();
2841    partial void OnStringValueChanging(string value);
2842    partial void OnStringValueChanged();
2843    partial void OnBinaryDataIdChanging(System.Nullable<long> value);
2844    partial void OnBinaryDataIdChanged();
2845    #endregion
2846   
2847    public Value()
2848    {
2849      this._BinaryData = default(EntityRef<BinaryData>);
2850      this._DataType = default(EntityRef<DataType>);
2851      this._Run = default(EntityRef<Run>);
2852      this._ValueName = default(EntityRef<ValueName>);
2853      OnCreated();
2854    }
2855   
2856    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
2857    public long Id
2858    {
2859      get
2860      {
2861        return this._Id;
2862      }
2863      set
2864      {
2865        if ((this._Id != value))
2866        {
2867          this.OnIdChanging(value);
2868          this.SendPropertyChanging();
2869          this._Id = value;
2870          this.SendPropertyChanged("Id");
2871          this.OnIdChanged();
2872        }
2873      }
2874    }
2875   
2876    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RunId", DbType="BigInt NOT NULL")]
2877    public long RunId
2878    {
2879      get
2880      {
2881        return this._RunId;
2882      }
2883      set
2884      {
2885        if ((this._RunId != value))
2886        {
2887          if (this._Run.HasLoadedOrAssignedValue)
2888          {
2889            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2890          }
2891          this.OnRunIdChanging(value);
2892          this.SendPropertyChanging();
2893          this._RunId = value;
2894          this.SendPropertyChanged("RunId");
2895          this.OnRunIdChanged();
2896        }
2897      }
2898    }
2899   
2900    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ValueNameId", DbType="BigInt NOT NULL")]
2901    public long ValueNameId
2902    {
2903      get
2904      {
2905        return this._ValueNameId;
2906      }
2907      set
2908      {
2909        if ((this._ValueNameId != value))
2910        {
2911          if (this._ValueName.HasLoadedOrAssignedValue)
2912          {
2913            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2914          }
2915          this.OnValueNameIdChanging(value);
2916          this.SendPropertyChanging();
2917          this._ValueNameId = value;
2918          this.SendPropertyChanged("ValueNameId");
2919          this.OnValueNameIdChanged();
2920        }
2921      }
2922    }
2923   
2924    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataTypeId", DbType="BigInt NOT NULL")]
2925    public long DataTypeId
2926    {
2927      get
2928      {
2929        return this._DataTypeId;
2930      }
2931      set
2932      {
2933        if ((this._DataTypeId != value))
2934        {
2935          if (this._DataType.HasLoadedOrAssignedValue)
2936          {
2937            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2938          }
2939          this.OnDataTypeIdChanging(value);
2940          this.SendPropertyChanging();
2941          this._DataTypeId = value;
2942          this.SendPropertyChanged("DataTypeId");
2943          this.OnDataTypeIdChanged();
2944        }
2945      }
2946    }
2947   
2948    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BoolValue", DbType="Bit")]
2949    public System.Nullable<bool> BoolValue
2950    {
2951      get
2952      {
2953        return this._BoolValue;
2954      }
2955      set
2956      {
2957        if ((this._BoolValue != value))
2958        {
2959          this.OnBoolValueChanging(value);
2960          this.SendPropertyChanging();
2961          this._BoolValue = value;
2962          this.SendPropertyChanged("BoolValue");
2963          this.OnBoolValueChanged();
2964        }
2965      }
2966    }
2967   
2968    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IntValue", DbType="Int")]
2969    public System.Nullable<int> IntValue
2970    {
2971      get
2972      {
2973        return this._IntValue;
2974      }
2975      set
2976      {
2977        if ((this._IntValue != value))
2978        {
2979          this.OnIntValueChanging(value);
2980          this.SendPropertyChanging();
2981          this._IntValue = value;
2982          this.SendPropertyChanged("IntValue");
2983          this.OnIntValueChanged();
2984        }
2985      }
2986    }
2987   
2988    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LongValue", DbType="BigInt")]
2989    public System.Nullable<long> LongValue
2990    {
2991      get
2992      {
2993        return this._LongValue;
2994      }
2995      set
2996      {
2997        if ((this._LongValue != value))
2998        {
2999          this.OnLongValueChanging(value);
3000          this.SendPropertyChanging();
3001          this._LongValue = value;
3002          this.SendPropertyChanged("LongValue");
3003          this.OnLongValueChanged();
3004        }
3005      }
3006    }
3007   
3008    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FloatValue", DbType="Real")]
3009    public System.Nullable<float> FloatValue
3010    {
3011      get
3012      {
3013        return this._FloatValue;
3014      }
3015      set
3016      {
3017        if ((this._FloatValue != value))
3018        {
3019          this.OnFloatValueChanging(value);
3020          this.SendPropertyChanging();
3021          this._FloatValue = value;
3022          this.SendPropertyChanged("FloatValue");
3023          this.OnFloatValueChanged();
3024        }
3025      }
3026    }
3027   
3028    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DoubleValue", DbType="Float")]
3029    public System.Nullable<double> DoubleValue
3030    {
3031      get
3032      {
3033        return this._DoubleValue;
3034      }
3035      set
3036      {
3037        if ((this._DoubleValue != value))
3038        {
3039          this.OnDoubleValueChanging(value);
3040          this.SendPropertyChanging();
3041          this._DoubleValue = value;
3042          this.SendPropertyChanged("DoubleValue");
3043          this.OnDoubleValueChanged();
3044        }
3045      }
3046    }
3047   
3048    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StringValue", DbType="NVarChar(MAX)")]
3049    public string StringValue
3050    {
3051      get
3052      {
3053        return this._StringValue;
3054      }
3055      set
3056      {
3057        if ((this._StringValue != value))
3058        {
3059          this.OnStringValueChanging(value);
3060          this.SendPropertyChanging();
3061          this._StringValue = value;
3062          this.SendPropertyChanged("StringValue");
3063          this.OnStringValueChanged();
3064        }
3065      }
3066    }
3067   
3068    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt")]
3069    public System.Nullable<long> BinaryDataId
3070    {
3071      get
3072      {
3073        return this._BinaryDataId;
3074      }
3075      set
3076      {
3077        if ((this._BinaryDataId != value))
3078        {
3079          if (this._BinaryData.HasLoadedOrAssignedValue)
3080          {
3081            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3082          }
3083          this.OnBinaryDataIdChanging(value);
3084          this.SendPropertyChanging();
3085          this._BinaryDataId = value;
3086          this.SendPropertyChanged("BinaryDataId");
3087          this.OnBinaryDataIdChanged();
3088        }
3089      }
3090    }
3091   
3092    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Value", Storage="_BinaryData", ThisKey="BinaryDataId", OtherKey="Id", IsForeignKey=true)]
3093    public BinaryData BinaryData
3094    {
3095      get
3096      {
3097        return this._BinaryData.Entity;
3098      }
3099      set
3100      {
3101        BinaryData previousValue = this._BinaryData.Entity;
3102        if (((previousValue != value)
3103              || (this._BinaryData.HasLoadedOrAssignedValue == false)))
3104        {
3105          this.SendPropertyChanging();
3106          if ((previousValue != null))
3107          {
3108            this._BinaryData.Entity = null;
3109            previousValue.Values.Remove(this);
3110          }
3111          this._BinaryData.Entity = value;
3112          if ((value != null))
3113          {
3114            value.Values.Add(this);
3115            this._BinaryDataId = value.Id;
3116          }
3117          else
3118          {
3119            this._BinaryDataId = default(Nullable<long>);
3120          }
3121          this.SendPropertyChanged("BinaryData");
3122        }
3123      }
3124    }
3125   
3126    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Value", Storage="_DataType", ThisKey="DataTypeId", OtherKey="Id", IsForeignKey=true)]
3127    public DataType DataType
3128    {
3129      get
3130      {
3131        return this._DataType.Entity;
3132      }
3133      set
3134      {
3135        DataType previousValue = this._DataType.Entity;
3136        if (((previousValue != value)
3137              || (this._DataType.HasLoadedOrAssignedValue == false)))
3138        {
3139          this.SendPropertyChanging();
3140          if ((previousValue != null))
3141          {
3142            this._DataType.Entity = null;
3143            previousValue.Values.Remove(this);
3144          }
3145          this._DataType.Entity = value;
3146          if ((value != null))
3147          {
3148            value.Values.Add(this);
3149            this._DataTypeId = value.Id;
3150          }
3151          else
3152          {
3153            this._DataTypeId = default(long);
3154          }
3155          this.SendPropertyChanged("DataType");
3156        }
3157      }
3158    }
3159   
3160    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Run_Value", Storage="_Run", ThisKey="RunId", OtherKey="Id", IsForeignKey=true)]
3161    public Run Run
3162    {
3163      get
3164      {
3165        return this._Run.Entity;
3166      }
3167      set
3168      {
3169        Run previousValue = this._Run.Entity;
3170        if (((previousValue != value)
3171              || (this._Run.HasLoadedOrAssignedValue == false)))
3172        {
3173          this.SendPropertyChanging();
3174          if ((previousValue != null))
3175          {
3176            this._Run.Entity = null;
3177            previousValue.Values.Remove(this);
3178          }
3179          this._Run.Entity = value;
3180          if ((value != null))
3181          {
3182            value.Values.Add(this);
3183            this._RunId = value.Id;
3184          }
3185          else
3186          {
3187            this._RunId = default(long);
3188          }
3189          this.SendPropertyChanged("Run");
3190        }
3191      }
3192    }
3193   
3194    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="ValueName_Value", Storage="_ValueName", ThisKey="ValueNameId", OtherKey="Id", IsForeignKey=true)]
3195    public ValueName ValueName
3196    {
3197      get
3198      {
3199        return this._ValueName.Entity;
3200      }
3201      set
3202      {
3203        ValueName previousValue = this._ValueName.Entity;
3204        if (((previousValue != value)
3205              || (this._ValueName.HasLoadedOrAssignedValue == false)))
3206        {
3207          this.SendPropertyChanging();
3208          if ((previousValue != null))
3209          {
3210            this._ValueName.Entity = null;
3211            previousValue.Values.Remove(this);
3212          }
3213          this._ValueName.Entity = value;
3214          if ((value != null))
3215          {
3216            value.Values.Add(this);
3217            this._ValueNameId = value.Id;
3218          }
3219          else
3220          {
3221            this._ValueNameId = default(long);
3222          }
3223          this.SendPropertyChanged("ValueName");
3224        }
3225      }
3226    }
3227   
3228    public event PropertyChangingEventHandler PropertyChanging;
3229   
3230    public event PropertyChangedEventHandler PropertyChanged;
3231   
3232    protected virtual void SendPropertyChanging()
3233    {
3234      if ((this.PropertyChanging != null))
3235      {
3236        this.PropertyChanging(this, emptyChangingEventArgs);
3237      }
3238    }
3239   
3240    protected virtual void SendPropertyChanged(String propertyName)
3241    {
3242      if ((this.PropertyChanged != null))
3243      {
3244        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3245      }
3246    }
3247  }
3248 
3249  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Characteristic")]
3250  public partial class Characteristic : INotifyPropertyChanging, INotifyPropertyChanged
3251  {
3252   
3253    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3254   
3255    private long _Id;
3256   
3257    private string _Name;
3258   
3259    private byte _Type;
3260   
3261    private EntitySet<CharacteristicValue> _CharacteristicValues;
3262   
3263    #region Extensibility Method Definitions
3264    partial void OnLoaded();
3265    partial void OnValidate(System.Data.Linq.ChangeAction action);
3266    partial void OnCreated();
3267    partial void OnIdChanging(long value);
3268    partial void OnIdChanged();
3269    partial void OnNameChanging(string value);
3270    partial void OnNameChanged();
3271    partial void OnTypeChanging(byte value);
3272    partial void OnTypeChanged();
3273    #endregion
3274   
3275    public Characteristic()
3276    {
3277      this._CharacteristicValues = new EntitySet<CharacteristicValue>(new Action<CharacteristicValue>(this.attach_CharacteristicValues), new Action<CharacteristicValue>(this.detach_CharacteristicValues));
3278      OnCreated();
3279    }
3280   
3281    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
3282    public long Id
3283    {
3284      get
3285      {
3286        return this._Id;
3287      }
3288      set
3289      {
3290        if ((this._Id != value))
3291        {
3292          this.OnIdChanging(value);
3293          this.SendPropertyChanging();
3294          this._Id = value;
3295          this.SendPropertyChanged("Id");
3296          this.OnIdChanged();
3297        }
3298      }
3299    }
3300   
3301    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
3302    public string Name
3303    {
3304      get
3305      {
3306        return this._Name;
3307      }
3308      set
3309      {
3310        if ((this._Name != value))
3311        {
3312          this.OnNameChanging(value);
3313          this.SendPropertyChanging();
3314          this._Name = value;
3315          this.SendPropertyChanged("Name");
3316          this.OnNameChanged();
3317        }
3318      }
3319    }
3320   
3321    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="TinyInt NOT NULL")]
3322    public byte Type
3323    {
3324      get
3325      {
3326        return this._Type;
3327      }
3328      set
3329      {
3330        if ((this._Type != value))
3331        {
3332          this.OnTypeChanging(value);
3333          this.SendPropertyChanging();
3334          this._Type = value;
3335          this.SendPropertyChanged("Type");
3336          this.OnTypeChanged();
3337        }
3338      }
3339    }
3340   
3341    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Characteristic_CharacteristicValue", Storage="_CharacteristicValues", ThisKey="Id", OtherKey="CharacteristicId")]
3342    public EntitySet<CharacteristicValue> CharacteristicValues
3343    {
3344      get
3345      {
3346        return this._CharacteristicValues;
3347      }
3348      set
3349      {
3350        this._CharacteristicValues.Assign(value);
3351      }
3352    }
3353   
3354    public event PropertyChangingEventHandler PropertyChanging;
3355   
3356    public event PropertyChangedEventHandler PropertyChanged;
3357   
3358    protected virtual void SendPropertyChanging()
3359    {
3360      if ((this.PropertyChanging != null))
3361      {
3362        this.PropertyChanging(this, emptyChangingEventArgs);
3363      }
3364    }
3365   
3366    protected virtual void SendPropertyChanged(String propertyName)
3367    {
3368      if ((this.PropertyChanged != null))
3369      {
3370        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3371      }
3372    }
3373   
3374    private void attach_CharacteristicValues(CharacteristicValue entity)
3375    {
3376      this.SendPropertyChanging();
3377      entity.Characteristic = this;
3378    }
3379   
3380    private void detach_CharacteristicValues(CharacteristicValue entity)
3381    {
3382      this.SendPropertyChanging();
3383      entity.Characteristic = null;
3384    }
3385  }
3386 
3387  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.CharacteristicValue")]
3388  public partial class CharacteristicValue : INotifyPropertyChanging, INotifyPropertyChanged
3389  {
3390   
3391    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3392   
3393    private long _Id;
3394   
3395    private long _ProblemId;
3396   
3397    private long _CharacteristicId;
3398   
3399    private long _DataTypeId;
3400   
3401    private System.Nullable<bool> _BoolValue;
3402   
3403    private System.Nullable<int> _IntValue;
3404   
3405    private System.Nullable<long> _LongValue;
3406   
3407    private System.Nullable<float> _FloatValue;
3408   
3409    private System.Nullable<double> _DoubleValue;
3410   
3411    private string _StringValue;
3412   
3413    private EntityRef<Characteristic> _Characteristic;
3414   
3415    private EntityRef<DataType> _DataType;
3416   
3417    private EntityRef<Problem> _Problem;
3418   
3419    #region Extensibility Method Definitions
3420    partial void OnLoaded();
3421    partial void OnValidate(System.Data.Linq.ChangeAction action);
3422    partial void OnCreated();
3423    partial void OnIdChanging(long value);
3424    partial void OnIdChanged();
3425    partial void OnProblemIdChanging(long value);
3426    partial void OnProblemIdChanged();
3427    partial void OnCharacteristicIdChanging(long value);
3428    partial void OnCharacteristicIdChanged();
3429    partial void OnDataTypeIdChanging(long value);
3430    partial void OnDataTypeIdChanged();
3431    partial void OnBoolValueChanging(System.Nullable<bool> value);
3432    partial void OnBoolValueChanged();
3433    partial void OnIntValueChanging(System.Nullable<int> value);
3434    partial void OnIntValueChanged();
3435    partial void OnLongValueChanging(System.Nullable<long> value);
3436    partial void OnLongValueChanged();
3437    partial void OnFloatValueChanging(System.Nullable<float> value);
3438    partial void OnFloatValueChanged();
3439    partial void OnDoubleValueChanging(System.Nullable<double> value);
3440    partial void OnDoubleValueChanged();
3441    partial void OnStringValueChanging(string value);
3442    partial void OnStringValueChanged();
3443    #endregion
3444   
3445    public CharacteristicValue()
3446    {
3447      this._Characteristic = default(EntityRef<Characteristic>);
3448      this._DataType = default(EntityRef<DataType>);
3449      this._Problem = default(EntityRef<Problem>);
3450      OnCreated();
3451    }
3452   
3453    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
3454    public long Id
3455    {
3456      get
3457      {
3458        return this._Id;
3459      }
3460      set
3461      {
3462        if ((this._Id != value))
3463        {
3464          this.OnIdChanging(value);
3465          this.SendPropertyChanging();
3466          this._Id = value;
3467          this.SendPropertyChanged("Id");
3468          this.OnIdChanged();
3469        }
3470      }
3471    }
3472   
3473    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemId", DbType="BigInt NOT NULL")]
3474    public long ProblemId
3475    {
3476      get
3477      {
3478        return this._ProblemId;
3479      }
3480      set
3481      {
3482        if ((this._ProblemId != value))
3483        {
3484          if (this._Problem.HasLoadedOrAssignedValue)
3485          {
3486            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3487          }
3488          this.OnProblemIdChanging(value);
3489          this.SendPropertyChanging();
3490          this._ProblemId = value;
3491          this.SendPropertyChanged("ProblemId");
3492          this.OnProblemIdChanged();
3493        }
3494      }
3495    }
3496   
3497    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CharacteristicId", DbType="BigInt NOT NULL")]
3498    public long CharacteristicId
3499    {
3500      get
3501      {
3502        return this._CharacteristicId;
3503      }
3504      set
3505      {
3506        if ((this._CharacteristicId != value))
3507        {
3508          if (this._Characteristic.HasLoadedOrAssignedValue)
3509          {
3510            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3511          }
3512          this.OnCharacteristicIdChanging(value);
3513          this.SendPropertyChanging();
3514          this._CharacteristicId = value;
3515          this.SendPropertyChanged("CharacteristicId");
3516          this.OnCharacteristicIdChanged();
3517        }
3518      }
3519    }
3520   
3521    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataTypeId", DbType="BigInt NOT NULL")]
3522    public long DataTypeId
3523    {
3524      get
3525      {
3526        return this._DataTypeId;
3527      }
3528      set
3529      {
3530        if ((this._DataTypeId != value))
3531        {
3532          if (this._DataType.HasLoadedOrAssignedValue)
3533          {
3534            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3535          }
3536          this.OnDataTypeIdChanging(value);
3537          this.SendPropertyChanging();
3538          this._DataTypeId = value;
3539          this.SendPropertyChanged("DataTypeId");
3540          this.OnDataTypeIdChanged();
3541        }
3542      }
3543    }
3544   
3545    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BoolValue", DbType="Bit")]
3546    public System.Nullable<bool> BoolValue
3547    {
3548      get
3549      {
3550        return this._BoolValue;
3551      }
3552      set
3553      {
3554        if ((this._BoolValue != value))
3555        {
3556          this.OnBoolValueChanging(value);
3557          this.SendPropertyChanging();
3558          this._BoolValue = value;
3559          this.SendPropertyChanged("BoolValue");
3560          this.OnBoolValueChanged();
3561        }
3562      }
3563    }
3564   
3565    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IntValue", DbType="Int")]
3566    public System.Nullable<int> IntValue
3567    {
3568      get
3569      {
3570        return this._IntValue;
3571      }
3572      set
3573      {
3574        if ((this._IntValue != value))
3575        {
3576          this.OnIntValueChanging(value);
3577          this.SendPropertyChanging();
3578          this._IntValue = value;
3579          this.SendPropertyChanged("IntValue");
3580          this.OnIntValueChanged();
3581        }
3582      }
3583    }
3584   
3585    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LongValue", DbType="BigInt")]
3586    public System.Nullable<long> LongValue
3587    {
3588      get
3589      {
3590        return this._LongValue;
3591      }
3592      set
3593      {
3594        if ((this._LongValue != value))
3595        {
3596          this.OnLongValueChanging(value);
3597          this.SendPropertyChanging();
3598          this._LongValue = value;
3599          this.SendPropertyChanged("LongValue");
3600          this.OnLongValueChanged();
3601        }
3602      }
3603    }
3604   
3605    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FloatValue", DbType="Real")]
3606    public System.Nullable<float> FloatValue
3607    {
3608      get
3609      {
3610        return this._FloatValue;
3611      }
3612      set
3613      {
3614        if ((this._FloatValue != value))
3615        {
3616          this.OnFloatValueChanging(value);
3617          this.SendPropertyChanging();
3618          this._FloatValue = value;
3619          this.SendPropertyChanged("FloatValue");
3620          this.OnFloatValueChanged();
3621        }
3622      }
3623    }
3624   
3625    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DoubleValue", DbType="Float")]
3626    public System.Nullable<double> DoubleValue
3627    {
3628      get
3629      {
3630        return this._DoubleValue;
3631      }
3632      set
3633      {
3634        if ((this._DoubleValue != value))
3635        {
3636          this.OnDoubleValueChanging(value);
3637          this.SendPropertyChanging();
3638          this._DoubleValue = value;
3639          this.SendPropertyChanged("DoubleValue");
3640          this.OnDoubleValueChanged();
3641        }
3642      }
3643    }
3644   
3645    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StringValue", DbType="NVarChar(MAX)")]
3646    public string StringValue
3647    {
3648      get
3649      {
3650        return this._StringValue;
3651      }
3652      set
3653      {
3654        if ((this._StringValue != value))
3655        {
3656          this.OnStringValueChanging(value);
3657          this.SendPropertyChanging();
3658          this._StringValue = value;
3659          this.SendPropertyChanged("StringValue");
3660          this.OnStringValueChanged();
3661        }
3662      }
3663    }
3664   
3665    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Characteristic_CharacteristicValue", Storage="_Characteristic", ThisKey="CharacteristicId", OtherKey="Id", IsForeignKey=true)]
3666    public Characteristic Characteristic
3667    {
3668      get
3669      {
3670        return this._Characteristic.Entity;
3671      }
3672      set
3673      {
3674        Characteristic previousValue = this._Characteristic.Entity;
3675        if (((previousValue != value)
3676              || (this._Characteristic.HasLoadedOrAssignedValue == false)))
3677        {
3678          this.SendPropertyChanging();
3679          if ((previousValue != null))
3680          {
3681            this._Characteristic.Entity = null;
3682            previousValue.CharacteristicValues.Remove(this);
3683          }
3684          this._Characteristic.Entity = value;
3685          if ((value != null))
3686          {
3687            value.CharacteristicValues.Add(this);
3688            this._CharacteristicId = value.Id;
3689          }
3690          else
3691          {
3692            this._CharacteristicId = default(long);
3693          }
3694          this.SendPropertyChanged("Characteristic");
3695        }
3696      }
3697    }
3698   
3699    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_CharacteristicValue", Storage="_DataType", ThisKey="DataTypeId", OtherKey="Id", IsForeignKey=true)]
3700    public DataType DataType
3701    {
3702      get
3703      {
3704        return this._DataType.Entity;
3705      }
3706      set
3707      {
3708        DataType previousValue = this._DataType.Entity;
3709        if (((previousValue != value)
3710              || (this._DataType.HasLoadedOrAssignedValue == false)))
3711        {
3712          this.SendPropertyChanging();
3713          if ((previousValue != null))
3714          {
3715            this._DataType.Entity = null;
3716            previousValue.CharacteristicValues.Remove(this);
3717          }
3718          this._DataType.Entity = value;
3719          if ((value != null))
3720          {
3721            value.CharacteristicValues.Add(this);
3722            this._DataTypeId = value.Id;
3723          }
3724          else
3725          {
3726            this._DataTypeId = default(long);
3727          }
3728          this.SendPropertyChanged("DataType");
3729        }
3730      }
3731    }
3732   
3733    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_CharacteristicValue", Storage="_Problem", ThisKey="ProblemId", OtherKey="Id", IsForeignKey=true)]
3734    public Problem Problem
3735    {
3736      get
3737      {
3738        return this._Problem.Entity;
3739      }
3740      set
3741      {
3742        Problem previousValue = this._Problem.Entity;
3743        if (((previousValue != value)
3744              || (this._Problem.HasLoadedOrAssignedValue == false)))
3745        {
3746          this.SendPropertyChanging();
3747          if ((previousValue != null))
3748          {
3749            this._Problem.Entity = null;
3750            previousValue.CharacteristicValues.Remove(this);
3751          }
3752          this._Problem.Entity = value;
3753          if ((value != null))
3754          {
3755            value.CharacteristicValues.Add(this);
3756            this._ProblemId = value.Id;
3757          }
3758          else
3759          {
3760            this._ProblemId = default(long);
3761          }
3762          this.SendPropertyChanged("Problem");
3763        }
3764      }
3765    }
3766   
3767    public event PropertyChangingEventHandler PropertyChanging;
3768   
3769    public event PropertyChangedEventHandler PropertyChanged;
3770   
3771    protected virtual void SendPropertyChanging()
3772    {
3773      if ((this.PropertyChanging != null))
3774      {
3775        this.PropertyChanging(this, emptyChangingEventArgs);
3776      }
3777    }
3778   
3779    protected virtual void SendPropertyChanged(String propertyName)
3780    {
3781      if ((this.PropertyChanged != null))
3782      {
3783        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3784      }
3785    }
3786  }
3787}
3788#pragma warning restore 1591
Note: See TracBrowser for help on using the repository browser.