Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 7215 was 5587, checked in by swagner, 13 years ago

Worked on OKB (#1174)

File size: 94.6 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<Algorithm> _Algorithms;
763   
764    private EntitySet<Problem> _Problems;
765   
766    #region Extensibility Method Definitions
767    partial void OnLoaded();
768    partial void OnValidate(System.Data.Linq.ChangeAction action);
769    partial void OnCreated();
770    partial void OnIdChanging(long value);
771    partial void OnIdChanged();
772    partial void OnNameChanging(string value);
773    partial void OnNameChanged();
774    partial void OnDescriptionChanging(string value);
775    partial void OnDescriptionChanged();
776    #endregion
777   
778    public Platform()
779    {
780      this._Algorithms = new EntitySet<Algorithm>(new Action<Algorithm>(this.attach_Algorithms), new Action<Algorithm>(this.detach_Algorithms));
781      this._Problems = new EntitySet<Problem>(new Action<Problem>(this.attach_Problems), new Action<Problem>(this.detach_Problems));
782      OnCreated();
783    }
784   
785    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
786    public long Id
787    {
788      get
789      {
790        return this._Id;
791      }
792      set
793      {
794        if ((this._Id != value))
795        {
796          this.OnIdChanging(value);
797          this.SendPropertyChanging();
798          this._Id = value;
799          this.SendPropertyChanged("Id");
800          this.OnIdChanged();
801        }
802      }
803    }
804   
805    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
806    public string Name
807    {
808      get
809      {
810        return this._Name;
811      }
812      set
813      {
814        if ((this._Name != value))
815        {
816          this.OnNameChanging(value);
817          this.SendPropertyChanging();
818          this._Name = value;
819          this.SendPropertyChanged("Name");
820          this.OnNameChanged();
821        }
822      }
823    }
824   
825    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")]
826    public string Description
827    {
828      get
829      {
830        return this._Description;
831      }
832      set
833      {
834        if ((this._Description != value))
835        {
836          this.OnDescriptionChanging(value);
837          this.SendPropertyChanging();
838          this._Description = value;
839          this.SendPropertyChanged("Description");
840          this.OnDescriptionChanged();
841        }
842      }
843    }
844   
845    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_Algorithm", Storage="_Algorithms", ThisKey="Id", OtherKey="PlatformId")]
846    public EntitySet<Algorithm> Algorithms
847    {
848      get
849      {
850        return this._Algorithms;
851      }
852      set
853      {
854        this._Algorithms.Assign(value);
855      }
856    }
857   
858    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_Problem", Storage="_Problems", ThisKey="Id", OtherKey="PlatformId")]
859    public EntitySet<Problem> Problems
860    {
861      get
862      {
863        return this._Problems;
864      }
865      set
866      {
867        this._Problems.Assign(value);
868      }
869    }
870   
871    public event PropertyChangingEventHandler PropertyChanging;
872   
873    public event PropertyChangedEventHandler PropertyChanged;
874   
875    protected virtual void SendPropertyChanging()
876    {
877      if ((this.PropertyChanging != null))
878      {
879        this.PropertyChanging(this, emptyChangingEventArgs);
880      }
881    }
882   
883    protected virtual void SendPropertyChanged(String propertyName)
884    {
885      if ((this.PropertyChanged != null))
886      {
887        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
888      }
889    }
890   
891    private void attach_Algorithms(Algorithm entity)
892    {
893      this.SendPropertyChanging();
894      entity.Platform = this;
895    }
896   
897    private void detach_Algorithms(Algorithm entity)
898    {
899      this.SendPropertyChanging();
900      entity.Platform = null;
901    }
902   
903    private void attach_Problems(Problem entity)
904    {
905      this.SendPropertyChanging();
906      entity.Platform = this;
907    }
908   
909    private void detach_Problems(Problem entity)
910    {
911      this.SendPropertyChanging();
912      entity.Platform = null;
913    }
914  }
915 
916  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.DataType")]
917  public partial class DataType : INotifyPropertyChanging, INotifyPropertyChanged
918  {
919   
920    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
921   
922    private long _Id;
923   
924    private string _Name;
925   
926    private string _TypeName;
927   
928    private EntitySet<Algorithm> _Algorithms;
929   
930    private EntitySet<Problem> _Problems;
931   
932    private EntitySet<Value> _Values;
933   
934    private EntitySet<CharacteristicValue> _CharacteristicValues;
935   
936    #region Extensibility Method Definitions
937    partial void OnLoaded();
938    partial void OnValidate(System.Data.Linq.ChangeAction action);
939    partial void OnCreated();
940    partial void OnIdChanging(long value);
941    partial void OnIdChanged();
942    partial void OnNameChanging(string value);
943    partial void OnNameChanged();
944    partial void OnTypeNameChanging(string value);
945    partial void OnTypeNameChanged();
946    #endregion
947   
948    public DataType()
949    {
950      this._Algorithms = new EntitySet<Algorithm>(new Action<Algorithm>(this.attach_Algorithms), new Action<Algorithm>(this.detach_Algorithms));
951      this._Problems = new EntitySet<Problem>(new Action<Problem>(this.attach_Problems), new Action<Problem>(this.detach_Problems));
952      this._Values = new EntitySet<Value>(new Action<Value>(this.attach_Values), new Action<Value>(this.detach_Values));
953      this._CharacteristicValues = new EntitySet<CharacteristicValue>(new Action<CharacteristicValue>(this.attach_CharacteristicValues), new Action<CharacteristicValue>(this.detach_CharacteristicValues));
954      OnCreated();
955    }
956   
957    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
958    public long Id
959    {
960      get
961      {
962        return this._Id;
963      }
964      set
965      {
966        if ((this._Id != value))
967        {
968          this.OnIdChanging(value);
969          this.SendPropertyChanging();
970          this._Id = value;
971          this.SendPropertyChanged("Id");
972          this.OnIdChanged();
973        }
974      }
975    }
976   
977    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
978    public string Name
979    {
980      get
981      {
982        return this._Name;
983      }
984      set
985      {
986        if ((this._Name != value))
987        {
988          this.OnNameChanging(value);
989          this.SendPropertyChanging();
990          this._Name = value;
991          this.SendPropertyChanged("Name");
992          this.OnNameChanged();
993        }
994      }
995    }
996   
997    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeName", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
998    public string TypeName
999    {
1000      get
1001      {
1002        return this._TypeName;
1003      }
1004      set
1005      {
1006        if ((this._TypeName != value))
1007        {
1008          this.OnTypeNameChanging(value);
1009          this.SendPropertyChanging();
1010          this._TypeName = value;
1011          this.SendPropertyChanged("TypeName");
1012          this.OnTypeNameChanged();
1013        }
1014      }
1015    }
1016   
1017    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Algorithm", Storage="_Algorithms", ThisKey="Id", OtherKey="DataTypeId")]
1018    public EntitySet<Algorithm> Algorithms
1019    {
1020      get
1021      {
1022        return this._Algorithms;
1023      }
1024      set
1025      {
1026        this._Algorithms.Assign(value);
1027      }
1028    }
1029   
1030    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Problem", Storage="_Problems", ThisKey="Id", OtherKey="DataTypeId")]
1031    public EntitySet<Problem> Problems
1032    {
1033      get
1034      {
1035        return this._Problems;
1036      }
1037      set
1038      {
1039        this._Problems.Assign(value);
1040      }
1041    }
1042   
1043    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Value", Storage="_Values", ThisKey="Id", OtherKey="DataTypeId")]
1044    public EntitySet<Value> Values
1045    {
1046      get
1047      {
1048        return this._Values;
1049      }
1050      set
1051      {
1052        this._Values.Assign(value);
1053      }
1054    }
1055   
1056    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_CharacteristicValue", Storage="_CharacteristicValues", ThisKey="Id", OtherKey="DataTypeId")]
1057    public EntitySet<CharacteristicValue> CharacteristicValues
1058    {
1059      get
1060      {
1061        return this._CharacteristicValues;
1062      }
1063      set
1064      {
1065        this._CharacteristicValues.Assign(value);
1066      }
1067    }
1068   
1069    public event PropertyChangingEventHandler PropertyChanging;
1070   
1071    public event PropertyChangedEventHandler PropertyChanged;
1072   
1073    protected virtual void SendPropertyChanging()
1074    {
1075      if ((this.PropertyChanging != null))
1076      {
1077        this.PropertyChanging(this, emptyChangingEventArgs);
1078      }
1079    }
1080   
1081    protected virtual void SendPropertyChanged(String propertyName)
1082    {
1083      if ((this.PropertyChanged != null))
1084      {
1085        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
1086      }
1087    }
1088   
1089    private void attach_Algorithms(Algorithm entity)
1090    {
1091      this.SendPropertyChanging();
1092      entity.DataType = this;
1093    }
1094   
1095    private void detach_Algorithms(Algorithm entity)
1096    {
1097      this.SendPropertyChanging();
1098      entity.DataType = null;
1099    }
1100   
1101    private void attach_Problems(Problem entity)
1102    {
1103      this.SendPropertyChanging();
1104      entity.DataType = this;
1105    }
1106   
1107    private void detach_Problems(Problem entity)
1108    {
1109      this.SendPropertyChanging();
1110      entity.DataType = null;
1111    }
1112   
1113    private void attach_Values(Value entity)
1114    {
1115      this.SendPropertyChanging();
1116      entity.DataType = this;
1117    }
1118   
1119    private void detach_Values(Value entity)
1120    {
1121      this.SendPropertyChanging();
1122      entity.DataType = null;
1123    }
1124   
1125    private void attach_CharacteristicValues(CharacteristicValue entity)
1126    {
1127      this.SendPropertyChanging();
1128      entity.DataType = this;
1129    }
1130   
1131    private void detach_CharacteristicValues(CharacteristicValue entity)
1132    {
1133      this.SendPropertyChanging();
1134      entity.DataType = null;
1135    }
1136  }
1137 
1138  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ValueName")]
1139  public partial class ValueName : INotifyPropertyChanging, INotifyPropertyChanged
1140  {
1141   
1142    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
1143   
1144    private long _Id;
1145   
1146    private string _Name;
1147   
1148    private ValueNameCategory _Category;
1149   
1150    private ValueNameType _Type;
1151   
1152    private EntitySet<Value> _Values;
1153   
1154    #region Extensibility Method Definitions
1155    partial void OnLoaded();
1156    partial void OnValidate(System.Data.Linq.ChangeAction action);
1157    partial void OnCreated();
1158    partial void OnIdChanging(long value);
1159    partial void OnIdChanged();
1160    partial void OnNameChanging(string value);
1161    partial void OnNameChanged();
1162    partial void OnCategoryChanging(ValueNameCategory value);
1163    partial void OnCategoryChanged();
1164    partial void OnTypeChanging(ValueNameType value);
1165    partial void OnTypeChanged();
1166    #endregion
1167   
1168    public ValueName()
1169    {
1170      this._Values = new EntitySet<Value>(new Action<Value>(this.attach_Values), new Action<Value>(this.detach_Values));
1171      OnCreated();
1172    }
1173   
1174    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
1175    public long Id
1176    {
1177      get
1178      {
1179        return this._Id;
1180      }
1181      set
1182      {
1183        if ((this._Id != value))
1184        {
1185          this.OnIdChanging(value);
1186          this.SendPropertyChanging();
1187          this._Id = value;
1188          this.SendPropertyChanged("Id");
1189          this.OnIdChanged();
1190        }
1191      }
1192    }
1193   
1194    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
1195    public string Name
1196    {
1197      get
1198      {
1199        return this._Name;
1200      }
1201      set
1202      {
1203        if ((this._Name != value))
1204        {
1205          this.OnNameChanging(value);
1206          this.SendPropertyChanging();
1207          this._Name = value;
1208          this.SendPropertyChanged("Name");
1209          this.OnNameChanged();
1210        }
1211      }
1212    }
1213   
1214    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Category", DbType="TinyInt NOT NULL", CanBeNull=false)]
1215    public ValueNameCategory Category
1216    {
1217      get
1218      {
1219        return this._Category;
1220      }
1221      set
1222      {
1223        if ((this._Category != value))
1224        {
1225          this.OnCategoryChanging(value);
1226          this.SendPropertyChanging();
1227          this._Category = value;
1228          this.SendPropertyChanged("Category");
1229          this.OnCategoryChanged();
1230        }
1231      }
1232    }
1233   
1234    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="TinyInt NOT NULL", CanBeNull=false)]
1235    public ValueNameType Type
1236    {
1237      get
1238      {
1239        return this._Type;
1240      }
1241      set
1242      {
1243        if ((this._Type != value))
1244        {
1245          this.OnTypeChanging(value);
1246          this.SendPropertyChanging();
1247          this._Type = value;
1248          this.SendPropertyChanged("Type");
1249          this.OnTypeChanged();
1250        }
1251      }
1252    }
1253   
1254    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="ValueName_Value", Storage="_Values", ThisKey="Id", OtherKey="ValueNameId")]
1255    public EntitySet<Value> Values
1256    {
1257      get
1258      {
1259        return this._Values;
1260      }
1261      set
1262      {
1263        this._Values.Assign(value);
1264      }
1265    }
1266   
1267    public event PropertyChangingEventHandler PropertyChanging;
1268   
1269    public event PropertyChangedEventHandler PropertyChanged;
1270   
1271    protected virtual void SendPropertyChanging()
1272    {
1273      if ((this.PropertyChanging != null))
1274      {
1275        this.PropertyChanging(this, emptyChangingEventArgs);
1276      }
1277    }
1278   
1279    protected virtual void SendPropertyChanged(String propertyName)
1280    {
1281      if ((this.PropertyChanged != null))
1282      {
1283        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
1284      }
1285    }
1286   
1287    private void attach_Values(Value entity)
1288    {
1289      this.SendPropertyChanging();
1290      entity.ValueName = this;
1291    }
1292   
1293    private void detach_Values(Value entity)
1294    {
1295      this.SendPropertyChanging();
1296      entity.ValueName = null;
1297    }
1298  }
1299 
1300  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Algorithm")]
1301  public partial class Algorithm : INotifyPropertyChanging, INotifyPropertyChanged
1302  {
1303   
1304    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
1305   
1306    private long _Id;
1307   
1308    private long _AlgorithmClassId;
1309   
1310    private long _PlatformId;
1311   
1312    private long _DataTypeId;
1313   
1314    private System.Nullable<long> _BinaryDataId;
1315   
1316    private string _Name;
1317   
1318    private string _Description;
1319   
1320    private EntitySet<AlgorithmUser> _AlgorithmUsers;
1321   
1322    private EntitySet<Run> _Runs;
1323   
1324    private EntityRef<AlgorithmClass> _AlgorithmClass;
1325   
1326    private EntityRef<DataType> _DataType;
1327   
1328    private EntityRef<Platform> _Platform;
1329   
1330    private EntityRef<BinaryData> _BinaryData;
1331   
1332    #region Extensibility Method Definitions
1333    partial void OnLoaded();
1334    partial void OnValidate(System.Data.Linq.ChangeAction action);
1335    partial void OnCreated();
1336    partial void OnIdChanging(long value);
1337    partial void OnIdChanged();
1338    partial void OnAlgorithmClassIdChanging(long value);
1339    partial void OnAlgorithmClassIdChanged();
1340    partial void OnPlatformIdChanging(long value);
1341    partial void OnPlatformIdChanged();
1342    partial void OnDataTypeIdChanging(long value);
1343    partial void OnDataTypeIdChanged();
1344    partial void OnBinaryDataIdChanging(System.Nullable<long> value);
1345    partial void OnBinaryDataIdChanged();
1346    partial void OnNameChanging(string value);
1347    partial void OnNameChanged();
1348    partial void OnDescriptionChanging(string value);
1349    partial void OnDescriptionChanged();
1350    #endregion
1351   
1352    public Algorithm()
1353    {
1354      this._AlgorithmUsers = new EntitySet<AlgorithmUser>(new Action<AlgorithmUser>(this.attach_AlgorithmUsers), new Action<AlgorithmUser>(this.detach_AlgorithmUsers));
1355      this._Runs = new EntitySet<Run>(new Action<Run>(this.attach_Runs), new Action<Run>(this.detach_Runs));
1356      this._AlgorithmClass = default(EntityRef<AlgorithmClass>);
1357      this._DataType = default(EntityRef<DataType>);
1358      this._Platform = default(EntityRef<Platform>);
1359      this._BinaryData = default(EntityRef<BinaryData>);
1360      OnCreated();
1361    }
1362   
1363    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
1364    public long Id
1365    {
1366      get
1367      {
1368        return this._Id;
1369      }
1370      set
1371      {
1372        if ((this._Id != value))
1373        {
1374          this.OnIdChanging(value);
1375          this.SendPropertyChanging();
1376          this._Id = value;
1377          this.SendPropertyChanged("Id");
1378          this.OnIdChanged();
1379        }
1380      }
1381    }
1382   
1383    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AlgorithmClassId", DbType="BigInt NOT NULL")]
1384    public long AlgorithmClassId
1385    {
1386      get
1387      {
1388        return this._AlgorithmClassId;
1389      }
1390      set
1391      {
1392        if ((this._AlgorithmClassId != value))
1393        {
1394          if (this._AlgorithmClass.HasLoadedOrAssignedValue)
1395          {
1396            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1397          }
1398          this.OnAlgorithmClassIdChanging(value);
1399          this.SendPropertyChanging();
1400          this._AlgorithmClassId = value;
1401          this.SendPropertyChanged("AlgorithmClassId");
1402          this.OnAlgorithmClassIdChanged();
1403        }
1404      }
1405    }
1406   
1407    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlatformId", DbType="BigInt NOT NULL")]
1408    public long PlatformId
1409    {
1410      get
1411      {
1412        return this._PlatformId;
1413      }
1414      set
1415      {
1416        if ((this._PlatformId != value))
1417        {
1418          if (this._Platform.HasLoadedOrAssignedValue)
1419          {
1420            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1421          }
1422          this.OnPlatformIdChanging(value);
1423          this.SendPropertyChanging();
1424          this._PlatformId = value;
1425          this.SendPropertyChanged("PlatformId");
1426          this.OnPlatformIdChanged();
1427        }
1428      }
1429    }
1430   
1431    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataTypeId", DbType="BigInt NOT NULL")]
1432    public long DataTypeId
1433    {
1434      get
1435      {
1436        return this._DataTypeId;
1437      }
1438      set
1439      {
1440        if ((this._DataTypeId != value))
1441        {
1442          if (this._DataType.HasLoadedOrAssignedValue)
1443          {
1444            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1445          }
1446          this.OnDataTypeIdChanging(value);
1447          this.SendPropertyChanging();
1448          this._DataTypeId = value;
1449          this.SendPropertyChanged("DataTypeId");
1450          this.OnDataTypeIdChanged();
1451        }
1452      }
1453    }
1454   
1455    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt")]
1456    public System.Nullable<long> BinaryDataId
1457    {
1458      get
1459      {
1460        return this._BinaryDataId;
1461      }
1462      set
1463      {
1464        if ((this._BinaryDataId != value))
1465        {
1466          if (this._BinaryData.HasLoadedOrAssignedValue)
1467          {
1468            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1469          }
1470          this.OnBinaryDataIdChanging(value);
1471          this.SendPropertyChanging();
1472          this._BinaryDataId = value;
1473          this.SendPropertyChanged("BinaryDataId");
1474          this.OnBinaryDataIdChanged();
1475        }
1476      }
1477    }
1478   
1479    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
1480    public string Name
1481    {
1482      get
1483      {
1484        return this._Name;
1485      }
1486      set
1487      {
1488        if ((this._Name != value))
1489        {
1490          this.OnNameChanging(value);
1491          this.SendPropertyChanging();
1492          this._Name = value;
1493          this.SendPropertyChanged("Name");
1494          this.OnNameChanged();
1495        }
1496      }
1497    }
1498   
1499    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")]
1500    public string Description
1501    {
1502      get
1503      {
1504        return this._Description;
1505      }
1506      set
1507      {
1508        if ((this._Description != value))
1509        {
1510          this.OnDescriptionChanging(value);
1511          this.SendPropertyChanging();
1512          this._Description = value;
1513          this.SendPropertyChanged("Description");
1514          this.OnDescriptionChanged();
1515        }
1516      }
1517    }
1518   
1519    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Algorithm_AlgorithmUser", Storage="_AlgorithmUsers", ThisKey="Id", OtherKey="AlgorithmId")]
1520    public EntitySet<AlgorithmUser> AlgorithmUsers
1521    {
1522      get
1523      {
1524        return this._AlgorithmUsers;
1525      }
1526      set
1527      {
1528        this._AlgorithmUsers.Assign(value);
1529      }
1530    }
1531   
1532    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Algorithm_Run", Storage="_Runs", ThisKey="Id", OtherKey="AlgorithmId")]
1533    public EntitySet<Run> Runs
1534    {
1535      get
1536      {
1537        return this._Runs;
1538      }
1539      set
1540      {
1541        this._Runs.Assign(value);
1542      }
1543    }
1544   
1545    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="AlgorithmClass_Algorithm", Storage="_AlgorithmClass", ThisKey="AlgorithmClassId", OtherKey="Id", IsForeignKey=true)]
1546    public AlgorithmClass AlgorithmClass
1547    {
1548      get
1549      {
1550        return this._AlgorithmClass.Entity;
1551      }
1552      set
1553      {
1554        AlgorithmClass previousValue = this._AlgorithmClass.Entity;
1555        if (((previousValue != value)
1556              || (this._AlgorithmClass.HasLoadedOrAssignedValue == false)))
1557        {
1558          this.SendPropertyChanging();
1559          if ((previousValue != null))
1560          {
1561            this._AlgorithmClass.Entity = null;
1562            previousValue.Algorithms.Remove(this);
1563          }
1564          this._AlgorithmClass.Entity = value;
1565          if ((value != null))
1566          {
1567            value.Algorithms.Add(this);
1568            this._AlgorithmClassId = value.Id;
1569          }
1570          else
1571          {
1572            this._AlgorithmClassId = default(long);
1573          }
1574          this.SendPropertyChanged("AlgorithmClass");
1575        }
1576      }
1577    }
1578   
1579    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Algorithm", Storage="_DataType", ThisKey="DataTypeId", OtherKey="Id", IsForeignKey=true)]
1580    public DataType DataType
1581    {
1582      get
1583      {
1584        return this._DataType.Entity;
1585      }
1586      set
1587      {
1588        DataType previousValue = this._DataType.Entity;
1589        if (((previousValue != value)
1590              || (this._DataType.HasLoadedOrAssignedValue == false)))
1591        {
1592          this.SendPropertyChanging();
1593          if ((previousValue != null))
1594          {
1595            this._DataType.Entity = null;
1596            previousValue.Algorithms.Remove(this);
1597          }
1598          this._DataType.Entity = value;
1599          if ((value != null))
1600          {
1601            value.Algorithms.Add(this);
1602            this._DataTypeId = value.Id;
1603          }
1604          else
1605          {
1606            this._DataTypeId = default(long);
1607          }
1608          this.SendPropertyChanged("DataType");
1609        }
1610      }
1611    }
1612   
1613    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_Algorithm", Storage="_Platform", ThisKey="PlatformId", OtherKey="Id", IsForeignKey=true)]
1614    public Platform Platform
1615    {
1616      get
1617      {
1618        return this._Platform.Entity;
1619      }
1620      set
1621      {
1622        Platform previousValue = this._Platform.Entity;
1623        if (((previousValue != value)
1624              || (this._Platform.HasLoadedOrAssignedValue == false)))
1625        {
1626          this.SendPropertyChanging();
1627          if ((previousValue != null))
1628          {
1629            this._Platform.Entity = null;
1630            previousValue.Algorithms.Remove(this);
1631          }
1632          this._Platform.Entity = value;
1633          if ((value != null))
1634          {
1635            value.Algorithms.Add(this);
1636            this._PlatformId = value.Id;
1637          }
1638          else
1639          {
1640            this._PlatformId = default(long);
1641          }
1642          this.SendPropertyChanged("Platform");
1643        }
1644      }
1645    }
1646   
1647    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Algorithm", Storage="_BinaryData", ThisKey="BinaryDataId", OtherKey="Id", IsForeignKey=true)]
1648    public BinaryData BinaryData
1649    {
1650      get
1651      {
1652        return this._BinaryData.Entity;
1653      }
1654      set
1655      {
1656        BinaryData previousValue = this._BinaryData.Entity;
1657        if (((previousValue != value)
1658              || (this._BinaryData.HasLoadedOrAssignedValue == false)))
1659        {
1660          this.SendPropertyChanging();
1661          if ((previousValue != null))
1662          {
1663            this._BinaryData.Entity = null;
1664            previousValue.Algorithms.Remove(this);
1665          }
1666          this._BinaryData.Entity = value;
1667          if ((value != null))
1668          {
1669            value.Algorithms.Add(this);
1670            this._BinaryDataId = value.Id;
1671          }
1672          else
1673          {
1674            this._BinaryDataId = default(Nullable<long>);
1675          }
1676          this.SendPropertyChanged("BinaryData");
1677        }
1678      }
1679    }
1680   
1681    public event PropertyChangingEventHandler PropertyChanging;
1682   
1683    public event PropertyChangedEventHandler PropertyChanged;
1684   
1685    protected virtual void SendPropertyChanging()
1686    {
1687      if ((this.PropertyChanging != null))
1688      {
1689        this.PropertyChanging(this, emptyChangingEventArgs);
1690      }
1691    }
1692   
1693    protected virtual void SendPropertyChanged(String propertyName)
1694    {
1695      if ((this.PropertyChanged != null))
1696      {
1697        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
1698      }
1699    }
1700   
1701    private void attach_AlgorithmUsers(AlgorithmUser entity)
1702    {
1703      this.SendPropertyChanging();
1704      entity.Algorithm = this;
1705    }
1706   
1707    private void detach_AlgorithmUsers(AlgorithmUser entity)
1708    {
1709      this.SendPropertyChanging();
1710      entity.Algorithm = null;
1711    }
1712   
1713    private void attach_Runs(Run entity)
1714    {
1715      this.SendPropertyChanging();
1716      entity.Algorithm = this;
1717    }
1718   
1719    private void detach_Runs(Run entity)
1720    {
1721      this.SendPropertyChanging();
1722      entity.Algorithm = null;
1723    }
1724  }
1725 
1726  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Problem")]
1727  public partial class Problem : INotifyPropertyChanging, INotifyPropertyChanged
1728  {
1729   
1730    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
1731   
1732    private long _Id;
1733   
1734    private long _ProblemClassId;
1735   
1736    private long _PlatformId;
1737   
1738    private long _DataTypeId;
1739   
1740    private System.Nullable<long> _BinaryDataId;
1741   
1742    private string _Name;
1743   
1744    private string _Description;
1745   
1746    private EntitySet<ProblemUser> _ProblemUsers;
1747   
1748    private EntitySet<Run> _Runs;
1749   
1750    private EntitySet<CharacteristicValue> _CharacteristicValues;
1751   
1752    private EntityRef<DataType> _DataType;
1753   
1754    private EntityRef<Platform> _Platform;
1755   
1756    private EntityRef<ProblemClass> _ProblemClass;
1757   
1758    private EntityRef<BinaryData> _BinaryData;
1759   
1760    #region Extensibility Method Definitions
1761    partial void OnLoaded();
1762    partial void OnValidate(System.Data.Linq.ChangeAction action);
1763    partial void OnCreated();
1764    partial void OnIdChanging(long value);
1765    partial void OnIdChanged();
1766    partial void OnProblemClassIdChanging(long value);
1767    partial void OnProblemClassIdChanged();
1768    partial void OnPlatformIdChanging(long value);
1769    partial void OnPlatformIdChanged();
1770    partial void OnDataTypeIdChanging(long value);
1771    partial void OnDataTypeIdChanged();
1772    partial void OnBinaryDataIdChanging(System.Nullable<long> value);
1773    partial void OnBinaryDataIdChanged();
1774    partial void OnNameChanging(string value);
1775    partial void OnNameChanged();
1776    partial void OnDescriptionChanging(string value);
1777    partial void OnDescriptionChanged();
1778    #endregion
1779   
1780    public Problem()
1781    {
1782      this._ProblemUsers = new EntitySet<ProblemUser>(new Action<ProblemUser>(this.attach_ProblemUsers), new Action<ProblemUser>(this.detach_ProblemUsers));
1783      this._Runs = new EntitySet<Run>(new Action<Run>(this.attach_Runs), new Action<Run>(this.detach_Runs));
1784      this._CharacteristicValues = new EntitySet<CharacteristicValue>(new Action<CharacteristicValue>(this.attach_CharacteristicValues), new Action<CharacteristicValue>(this.detach_CharacteristicValues));
1785      this._DataType = default(EntityRef<DataType>);
1786      this._Platform = default(EntityRef<Platform>);
1787      this._ProblemClass = default(EntityRef<ProblemClass>);
1788      this._BinaryData = default(EntityRef<BinaryData>);
1789      OnCreated();
1790    }
1791   
1792    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
1793    public long Id
1794    {
1795      get
1796      {
1797        return this._Id;
1798      }
1799      set
1800      {
1801        if ((this._Id != value))
1802        {
1803          this.OnIdChanging(value);
1804          this.SendPropertyChanging();
1805          this._Id = value;
1806          this.SendPropertyChanged("Id");
1807          this.OnIdChanged();
1808        }
1809      }
1810    }
1811   
1812    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemClassId", DbType="BigInt NOT NULL")]
1813    public long ProblemClassId
1814    {
1815      get
1816      {
1817        return this._ProblemClassId;
1818      }
1819      set
1820      {
1821        if ((this._ProblemClassId != value))
1822        {
1823          if (this._ProblemClass.HasLoadedOrAssignedValue)
1824          {
1825            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1826          }
1827          this.OnProblemClassIdChanging(value);
1828          this.SendPropertyChanging();
1829          this._ProblemClassId = value;
1830          this.SendPropertyChanged("ProblemClassId");
1831          this.OnProblemClassIdChanged();
1832        }
1833      }
1834    }
1835   
1836    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlatformId", DbType="BigInt NOT NULL")]
1837    public long PlatformId
1838    {
1839      get
1840      {
1841        return this._PlatformId;
1842      }
1843      set
1844      {
1845        if ((this._PlatformId != value))
1846        {
1847          if (this._Platform.HasLoadedOrAssignedValue)
1848          {
1849            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1850          }
1851          this.OnPlatformIdChanging(value);
1852          this.SendPropertyChanging();
1853          this._PlatformId = value;
1854          this.SendPropertyChanged("PlatformId");
1855          this.OnPlatformIdChanged();
1856        }
1857      }
1858    }
1859   
1860    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataTypeId", DbType="BigInt NOT NULL")]
1861    public long DataTypeId
1862    {
1863      get
1864      {
1865        return this._DataTypeId;
1866      }
1867      set
1868      {
1869        if ((this._DataTypeId != value))
1870        {
1871          if (this._DataType.HasLoadedOrAssignedValue)
1872          {
1873            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1874          }
1875          this.OnDataTypeIdChanging(value);
1876          this.SendPropertyChanging();
1877          this._DataTypeId = value;
1878          this.SendPropertyChanged("DataTypeId");
1879          this.OnDataTypeIdChanged();
1880        }
1881      }
1882    }
1883   
1884    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt")]
1885    public System.Nullable<long> BinaryDataId
1886    {
1887      get
1888      {
1889        return this._BinaryDataId;
1890      }
1891      set
1892      {
1893        if ((this._BinaryDataId != value))
1894        {
1895          if (this._BinaryData.HasLoadedOrAssignedValue)
1896          {
1897            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
1898          }
1899          this.OnBinaryDataIdChanging(value);
1900          this.SendPropertyChanging();
1901          this._BinaryDataId = value;
1902          this.SendPropertyChanged("BinaryDataId");
1903          this.OnBinaryDataIdChanged();
1904        }
1905      }
1906    }
1907   
1908    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
1909    public string Name
1910    {
1911      get
1912      {
1913        return this._Name;
1914      }
1915      set
1916      {
1917        if ((this._Name != value))
1918        {
1919          this.OnNameChanging(value);
1920          this.SendPropertyChanging();
1921          this._Name = value;
1922          this.SendPropertyChanged("Name");
1923          this.OnNameChanged();
1924        }
1925      }
1926    }
1927   
1928    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")]
1929    public string Description
1930    {
1931      get
1932      {
1933        return this._Description;
1934      }
1935      set
1936      {
1937        if ((this._Description != value))
1938        {
1939          this.OnDescriptionChanging(value);
1940          this.SendPropertyChanging();
1941          this._Description = value;
1942          this.SendPropertyChanged("Description");
1943          this.OnDescriptionChanged();
1944        }
1945      }
1946    }
1947   
1948    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_ProblemUser", Storage="_ProblemUsers", ThisKey="Id", OtherKey="ProblemId")]
1949    public EntitySet<ProblemUser> ProblemUsers
1950    {
1951      get
1952      {
1953        return this._ProblemUsers;
1954      }
1955      set
1956      {
1957        this._ProblemUsers.Assign(value);
1958      }
1959    }
1960   
1961    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_Run", Storage="_Runs", ThisKey="Id", OtherKey="ProblemId")]
1962    public EntitySet<Run> Runs
1963    {
1964      get
1965      {
1966        return this._Runs;
1967      }
1968      set
1969      {
1970        this._Runs.Assign(value);
1971      }
1972    }
1973   
1974    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_CharacteristicValue", Storage="_CharacteristicValues", ThisKey="Id", OtherKey="ProblemId")]
1975    public EntitySet<CharacteristicValue> CharacteristicValues
1976    {
1977      get
1978      {
1979        return this._CharacteristicValues;
1980      }
1981      set
1982      {
1983        this._CharacteristicValues.Assign(value);
1984      }
1985    }
1986   
1987    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Problem", Storage="_DataType", ThisKey="DataTypeId", OtherKey="Id", IsForeignKey=true)]
1988    public DataType DataType
1989    {
1990      get
1991      {
1992        return this._DataType.Entity;
1993      }
1994      set
1995      {
1996        DataType previousValue = this._DataType.Entity;
1997        if (((previousValue != value)
1998              || (this._DataType.HasLoadedOrAssignedValue == false)))
1999        {
2000          this.SendPropertyChanging();
2001          if ((previousValue != null))
2002          {
2003            this._DataType.Entity = null;
2004            previousValue.Problems.Remove(this);
2005          }
2006          this._DataType.Entity = value;
2007          if ((value != null))
2008          {
2009            value.Problems.Add(this);
2010            this._DataTypeId = value.Id;
2011          }
2012          else
2013          {
2014            this._DataTypeId = default(long);
2015          }
2016          this.SendPropertyChanged("DataType");
2017        }
2018      }
2019    }
2020   
2021    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_Problem", Storage="_Platform", ThisKey="PlatformId", OtherKey="Id", IsForeignKey=true)]
2022    public Platform Platform
2023    {
2024      get
2025      {
2026        return this._Platform.Entity;
2027      }
2028      set
2029      {
2030        Platform previousValue = this._Platform.Entity;
2031        if (((previousValue != value)
2032              || (this._Platform.HasLoadedOrAssignedValue == false)))
2033        {
2034          this.SendPropertyChanging();
2035          if ((previousValue != null))
2036          {
2037            this._Platform.Entity = null;
2038            previousValue.Problems.Remove(this);
2039          }
2040          this._Platform.Entity = value;
2041          if ((value != null))
2042          {
2043            value.Problems.Add(this);
2044            this._PlatformId = value.Id;
2045          }
2046          else
2047          {
2048            this._PlatformId = default(long);
2049          }
2050          this.SendPropertyChanged("Platform");
2051        }
2052      }
2053    }
2054   
2055    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="ProblemClass_Problem", Storage="_ProblemClass", ThisKey="ProblemClassId", OtherKey="Id", IsForeignKey=true)]
2056    public ProblemClass ProblemClass
2057    {
2058      get
2059      {
2060        return this._ProblemClass.Entity;
2061      }
2062      set
2063      {
2064        ProblemClass previousValue = this._ProblemClass.Entity;
2065        if (((previousValue != value)
2066              || (this._ProblemClass.HasLoadedOrAssignedValue == false)))
2067        {
2068          this.SendPropertyChanging();
2069          if ((previousValue != null))
2070          {
2071            this._ProblemClass.Entity = null;
2072            previousValue.Problems.Remove(this);
2073          }
2074          this._ProblemClass.Entity = value;
2075          if ((value != null))
2076          {
2077            value.Problems.Add(this);
2078            this._ProblemClassId = value.Id;
2079          }
2080          else
2081          {
2082            this._ProblemClassId = default(long);
2083          }
2084          this.SendPropertyChanged("ProblemClass");
2085        }
2086      }
2087    }
2088   
2089    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Problem", Storage="_BinaryData", ThisKey="BinaryDataId", OtherKey="Id", IsForeignKey=true)]
2090    public BinaryData BinaryData
2091    {
2092      get
2093      {
2094        return this._BinaryData.Entity;
2095      }
2096      set
2097      {
2098        BinaryData previousValue = this._BinaryData.Entity;
2099        if (((previousValue != value)
2100              || (this._BinaryData.HasLoadedOrAssignedValue == false)))
2101        {
2102          this.SendPropertyChanging();
2103          if ((previousValue != null))
2104          {
2105            this._BinaryData.Entity = null;
2106            previousValue.Problems.Remove(this);
2107          }
2108          this._BinaryData.Entity = value;
2109          if ((value != null))
2110          {
2111            value.Problems.Add(this);
2112            this._BinaryDataId = value.Id;
2113          }
2114          else
2115          {
2116            this._BinaryDataId = default(Nullable<long>);
2117          }
2118          this.SendPropertyChanged("BinaryData");
2119        }
2120      }
2121    }
2122   
2123    public event PropertyChangingEventHandler PropertyChanging;
2124   
2125    public event PropertyChangedEventHandler PropertyChanged;
2126   
2127    protected virtual void SendPropertyChanging()
2128    {
2129      if ((this.PropertyChanging != null))
2130      {
2131        this.PropertyChanging(this, emptyChangingEventArgs);
2132      }
2133    }
2134   
2135    protected virtual void SendPropertyChanged(String propertyName)
2136    {
2137      if ((this.PropertyChanged != null))
2138      {
2139        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2140      }
2141    }
2142   
2143    private void attach_ProblemUsers(ProblemUser entity)
2144    {
2145      this.SendPropertyChanging();
2146      entity.Problem = this;
2147    }
2148   
2149    private void detach_ProblemUsers(ProblemUser entity)
2150    {
2151      this.SendPropertyChanging();
2152      entity.Problem = null;
2153    }
2154   
2155    private void attach_Runs(Run entity)
2156    {
2157      this.SendPropertyChanging();
2158      entity.Problem = this;
2159    }
2160   
2161    private void detach_Runs(Run entity)
2162    {
2163      this.SendPropertyChanging();
2164      entity.Problem = null;
2165    }
2166   
2167    private void attach_CharacteristicValues(CharacteristicValue entity)
2168    {
2169      this.SendPropertyChanging();
2170      entity.Problem = this;
2171    }
2172   
2173    private void detach_CharacteristicValues(CharacteristicValue entity)
2174    {
2175      this.SendPropertyChanging();
2176      entity.Problem = null;
2177    }
2178  }
2179 
2180  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.BinaryData")]
2181  public partial class BinaryData : INotifyPropertyChanging, INotifyPropertyChanged
2182  {
2183   
2184    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2185   
2186    private long _Id;
2187   
2188    private System.Data.Linq.Binary _Data;
2189   
2190    private byte[] _Hash;
2191   
2192    private EntitySet<Algorithm> _Algorithms;
2193   
2194    private EntitySet<Problem> _Problems;
2195   
2196    private EntitySet<Value> _Values;
2197   
2198    #region Extensibility Method Definitions
2199    partial void OnLoaded();
2200    partial void OnValidate(System.Data.Linq.ChangeAction action);
2201    partial void OnCreated();
2202    partial void OnIdChanging(long value);
2203    partial void OnIdChanged();
2204    partial void OnDataChanging(System.Data.Linq.Binary value);
2205    partial void OnDataChanged();
2206    partial void OnHashChanging(byte[] value);
2207    partial void OnHashChanged();
2208    #endregion
2209   
2210    public BinaryData()
2211    {
2212      this._Algorithms = new EntitySet<Algorithm>(new Action<Algorithm>(this.attach_Algorithms), new Action<Algorithm>(this.detach_Algorithms));
2213      this._Problems = new EntitySet<Problem>(new Action<Problem>(this.attach_Problems), new Action<Problem>(this.detach_Problems));
2214      this._Values = new EntitySet<Value>(new Action<Value>(this.attach_Values), new Action<Value>(this.detach_Values));
2215      OnCreated();
2216    }
2217   
2218    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
2219    public long Id
2220    {
2221      get
2222      {
2223        return this._Id;
2224      }
2225      set
2226      {
2227        if ((this._Id != value))
2228        {
2229          this.OnIdChanging(value);
2230          this.SendPropertyChanging();
2231          this._Id = value;
2232          this.SendPropertyChanged("Id");
2233          this.OnIdChanged();
2234        }
2235      }
2236    }
2237   
2238    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX) NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2239    public System.Data.Linq.Binary Data
2240    {
2241      get
2242      {
2243        return this._Data;
2244      }
2245      set
2246      {
2247        if ((this._Data != value))
2248        {
2249          this.OnDataChanging(value);
2250          this.SendPropertyChanging();
2251          this._Data = value;
2252          this.SendPropertyChanged("Data");
2253          this.OnDataChanged();
2254        }
2255      }
2256    }
2257   
2258    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Hash", DbType="VarBinary(20) NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
2259    public byte[] Hash
2260    {
2261      get
2262      {
2263        return this._Hash;
2264      }
2265      set
2266      {
2267        if ((this._Hash != value))
2268        {
2269          this.OnHashChanging(value);
2270          this.SendPropertyChanging();
2271          this._Hash = value;
2272          this.SendPropertyChanged("Hash");
2273          this.OnHashChanged();
2274        }
2275      }
2276    }
2277   
2278    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Algorithm", Storage="_Algorithms", ThisKey="Id", OtherKey="BinaryDataId")]
2279    public EntitySet<Algorithm> Algorithms
2280    {
2281      get
2282      {
2283        return this._Algorithms;
2284      }
2285      set
2286      {
2287        this._Algorithms.Assign(value);
2288      }
2289    }
2290   
2291    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Problem", Storage="_Problems", ThisKey="Id", OtherKey="BinaryDataId")]
2292    public EntitySet<Problem> Problems
2293    {
2294      get
2295      {
2296        return this._Problems;
2297      }
2298      set
2299      {
2300        this._Problems.Assign(value);
2301      }
2302    }
2303   
2304    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Value", Storage="_Values", ThisKey="Id", OtherKey="BinaryDataId")]
2305    public EntitySet<Value> Values
2306    {
2307      get
2308      {
2309        return this._Values;
2310      }
2311      set
2312      {
2313        this._Values.Assign(value);
2314      }
2315    }
2316   
2317    public event PropertyChangingEventHandler PropertyChanging;
2318   
2319    public event PropertyChangedEventHandler PropertyChanged;
2320   
2321    protected virtual void SendPropertyChanging()
2322    {
2323      if ((this.PropertyChanging != null))
2324      {
2325        this.PropertyChanging(this, emptyChangingEventArgs);
2326      }
2327    }
2328   
2329    protected virtual void SendPropertyChanged(String propertyName)
2330    {
2331      if ((this.PropertyChanged != null))
2332      {
2333        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2334      }
2335    }
2336   
2337    private void attach_Algorithms(Algorithm entity)
2338    {
2339      this.SendPropertyChanging();
2340      entity.BinaryData = this;
2341    }
2342   
2343    private void detach_Algorithms(Algorithm entity)
2344    {
2345      this.SendPropertyChanging();
2346      entity.BinaryData = null;
2347    }
2348   
2349    private void attach_Problems(Problem entity)
2350    {
2351      this.SendPropertyChanging();
2352      entity.BinaryData = this;
2353    }
2354   
2355    private void detach_Problems(Problem entity)
2356    {
2357      this.SendPropertyChanging();
2358      entity.BinaryData = null;
2359    }
2360   
2361    private void attach_Values(Value entity)
2362    {
2363      this.SendPropertyChanging();
2364      entity.BinaryData = this;
2365    }
2366   
2367    private void detach_Values(Value entity)
2368    {
2369      this.SendPropertyChanging();
2370      entity.BinaryData = null;
2371    }
2372  }
2373 
2374  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Run")]
2375  public partial class Run : INotifyPropertyChanging, INotifyPropertyChanged
2376  {
2377   
2378    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2379   
2380    private long _Id;
2381   
2382    private long _AlgorithmId;
2383   
2384    private long _ProblemId;
2385   
2386    private int _RandomSeed;
2387   
2388    private System.DateTime _CreatedDate;
2389   
2390    private System.Guid _UserId;
2391   
2392    private System.Guid _ClientId;
2393   
2394    private EntitySet<Value> _Values;
2395   
2396    private EntityRef<Algorithm> _Algorithm;
2397   
2398    private EntityRef<Problem> _Problem;
2399   
2400    #region Extensibility Method Definitions
2401    partial void OnLoaded();
2402    partial void OnValidate(System.Data.Linq.ChangeAction action);
2403    partial void OnCreated();
2404    partial void OnIdChanging(long value);
2405    partial void OnIdChanged();
2406    partial void OnAlgorithmIdChanging(long value);
2407    partial void OnAlgorithmIdChanged();
2408    partial void OnProblemIdChanging(long value);
2409    partial void OnProblemIdChanged();
2410    partial void OnRandomSeedChanging(int value);
2411    partial void OnRandomSeedChanged();
2412    partial void OnCreatedDateChanging(System.DateTime value);
2413    partial void OnCreatedDateChanged();
2414    partial void OnUserIdChanging(System.Guid value);
2415    partial void OnUserIdChanged();
2416    partial void OnClientIdChanging(System.Guid value);
2417    partial void OnClientIdChanged();
2418    #endregion
2419   
2420    public Run()
2421    {
2422      this._Values = new EntitySet<Value>(new Action<Value>(this.attach_Values), new Action<Value>(this.detach_Values));
2423      this._Algorithm = default(EntityRef<Algorithm>);
2424      this._Problem = default(EntityRef<Problem>);
2425      OnCreated();
2426    }
2427   
2428    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
2429    public long Id
2430    {
2431      get
2432      {
2433        return this._Id;
2434      }
2435      set
2436      {
2437        if ((this._Id != value))
2438        {
2439          this.OnIdChanging(value);
2440          this.SendPropertyChanging();
2441          this._Id = value;
2442          this.SendPropertyChanged("Id");
2443          this.OnIdChanged();
2444        }
2445      }
2446    }
2447   
2448    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AlgorithmId", DbType="BigInt NOT NULL")]
2449    public long AlgorithmId
2450    {
2451      get
2452      {
2453        return this._AlgorithmId;
2454      }
2455      set
2456      {
2457        if ((this._AlgorithmId != value))
2458        {
2459          if (this._Algorithm.HasLoadedOrAssignedValue)
2460          {
2461            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2462          }
2463          this.OnAlgorithmIdChanging(value);
2464          this.SendPropertyChanging();
2465          this._AlgorithmId = value;
2466          this.SendPropertyChanged("AlgorithmId");
2467          this.OnAlgorithmIdChanged();
2468        }
2469      }
2470    }
2471   
2472    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemId", DbType="BigInt NOT NULL")]
2473    public long ProblemId
2474    {
2475      get
2476      {
2477        return this._ProblemId;
2478      }
2479      set
2480      {
2481        if ((this._ProblemId != value))
2482        {
2483          if (this._Problem.HasLoadedOrAssignedValue)
2484          {
2485            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2486          }
2487          this.OnProblemIdChanging(value);
2488          this.SendPropertyChanging();
2489          this._ProblemId = value;
2490          this.SendPropertyChanged("ProblemId");
2491          this.OnProblemIdChanged();
2492        }
2493      }
2494    }
2495   
2496    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RandomSeed", DbType="Int NOT NULL")]
2497    public int RandomSeed
2498    {
2499      get
2500      {
2501        return this._RandomSeed;
2502      }
2503      set
2504      {
2505        if ((this._RandomSeed != value))
2506        {
2507          this.OnRandomSeedChanging(value);
2508          this.SendPropertyChanging();
2509          this._RandomSeed = value;
2510          this.SendPropertyChanged("RandomSeed");
2511          this.OnRandomSeedChanged();
2512        }
2513      }
2514    }
2515   
2516    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreatedDate", DbType="DateTime2 NOT NULL")]
2517    public System.DateTime CreatedDate
2518    {
2519      get
2520      {
2521        return this._CreatedDate;
2522      }
2523      set
2524      {
2525        if ((this._CreatedDate != value))
2526        {
2527          this.OnCreatedDateChanging(value);
2528          this.SendPropertyChanging();
2529          this._CreatedDate = value;
2530          this.SendPropertyChanged("CreatedDate");
2531          this.OnCreatedDateChanged();
2532        }
2533      }
2534    }
2535   
2536    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL")]
2537    public System.Guid UserId
2538    {
2539      get
2540      {
2541        return this._UserId;
2542      }
2543      set
2544      {
2545        if ((this._UserId != value))
2546        {
2547          this.OnUserIdChanging(value);
2548          this.SendPropertyChanging();
2549          this._UserId = value;
2550          this.SendPropertyChanged("UserId");
2551          this.OnUserIdChanged();
2552        }
2553      }
2554    }
2555   
2556    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClientId", DbType="UniqueIdentifier NOT NULL")]
2557    public System.Guid ClientId
2558    {
2559      get
2560      {
2561        return this._ClientId;
2562      }
2563      set
2564      {
2565        if ((this._ClientId != value))
2566        {
2567          this.OnClientIdChanging(value);
2568          this.SendPropertyChanging();
2569          this._ClientId = value;
2570          this.SendPropertyChanged("ClientId");
2571          this.OnClientIdChanged();
2572        }
2573      }
2574    }
2575   
2576    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Run_Value", Storage="_Values", ThisKey="Id", OtherKey="RunId")]
2577    public EntitySet<Value> Values
2578    {
2579      get
2580      {
2581        return this._Values;
2582      }
2583      set
2584      {
2585        this._Values.Assign(value);
2586      }
2587    }
2588   
2589    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Algorithm_Run", Storage="_Algorithm", ThisKey="AlgorithmId", OtherKey="Id", IsForeignKey=true)]
2590    public Algorithm Algorithm
2591    {
2592      get
2593      {
2594        return this._Algorithm.Entity;
2595      }
2596      set
2597      {
2598        Algorithm previousValue = this._Algorithm.Entity;
2599        if (((previousValue != value)
2600              || (this._Algorithm.HasLoadedOrAssignedValue == false)))
2601        {
2602          this.SendPropertyChanging();
2603          if ((previousValue != null))
2604          {
2605            this._Algorithm.Entity = null;
2606            previousValue.Runs.Remove(this);
2607          }
2608          this._Algorithm.Entity = value;
2609          if ((value != null))
2610          {
2611            value.Runs.Add(this);
2612            this._AlgorithmId = value.Id;
2613          }
2614          else
2615          {
2616            this._AlgorithmId = default(long);
2617          }
2618          this.SendPropertyChanged("Algorithm");
2619        }
2620      }
2621    }
2622   
2623    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_Run", Storage="_Problem", ThisKey="ProblemId", OtherKey="Id", IsForeignKey=true)]
2624    public Problem Problem
2625    {
2626      get
2627      {
2628        return this._Problem.Entity;
2629      }
2630      set
2631      {
2632        Problem previousValue = this._Problem.Entity;
2633        if (((previousValue != value)
2634              || (this._Problem.HasLoadedOrAssignedValue == false)))
2635        {
2636          this.SendPropertyChanging();
2637          if ((previousValue != null))
2638          {
2639            this._Problem.Entity = null;
2640            previousValue.Runs.Remove(this);
2641          }
2642          this._Problem.Entity = value;
2643          if ((value != null))
2644          {
2645            value.Runs.Add(this);
2646            this._ProblemId = value.Id;
2647          }
2648          else
2649          {
2650            this._ProblemId = default(long);
2651          }
2652          this.SendPropertyChanged("Problem");
2653        }
2654      }
2655    }
2656   
2657    public event PropertyChangingEventHandler PropertyChanging;
2658   
2659    public event PropertyChangedEventHandler PropertyChanged;
2660   
2661    protected virtual void SendPropertyChanging()
2662    {
2663      if ((this.PropertyChanging != null))
2664      {
2665        this.PropertyChanging(this, emptyChangingEventArgs);
2666      }
2667    }
2668   
2669    protected virtual void SendPropertyChanged(String propertyName)
2670    {
2671      if ((this.PropertyChanged != null))
2672      {
2673        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
2674      }
2675    }
2676   
2677    private void attach_Values(Value entity)
2678    {
2679      this.SendPropertyChanging();
2680      entity.Run = this;
2681    }
2682   
2683    private void detach_Values(Value entity)
2684    {
2685      this.SendPropertyChanging();
2686      entity.Run = null;
2687    }
2688  }
2689 
2690  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Value")]
2691  public partial class Value : INotifyPropertyChanging, INotifyPropertyChanged
2692  {
2693   
2694    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
2695   
2696    private long _Id;
2697   
2698    private long _RunId;
2699   
2700    private long _ValueNameId;
2701   
2702    private long _DataTypeId;
2703   
2704    private System.Nullable<bool> _BoolValue;
2705   
2706    private System.Nullable<int> _IntValue;
2707   
2708    private System.Nullable<long> _LongValue;
2709   
2710    private System.Nullable<float> _FloatValue;
2711   
2712    private System.Nullable<double> _DoubleValue;
2713   
2714    private string _StringValue;
2715   
2716    private System.Nullable<long> _BinaryDataId;
2717   
2718    private EntityRef<BinaryData> _BinaryData;
2719   
2720    private EntityRef<DataType> _DataType;
2721   
2722    private EntityRef<Run> _Run;
2723   
2724    private EntityRef<ValueName> _ValueName;
2725   
2726    #region Extensibility Method Definitions
2727    partial void OnLoaded();
2728    partial void OnValidate(System.Data.Linq.ChangeAction action);
2729    partial void OnCreated();
2730    partial void OnIdChanging(long value);
2731    partial void OnIdChanged();
2732    partial void OnRunIdChanging(long value);
2733    partial void OnRunIdChanged();
2734    partial void OnValueNameIdChanging(long value);
2735    partial void OnValueNameIdChanged();
2736    partial void OnDataTypeIdChanging(long value);
2737    partial void OnDataTypeIdChanged();
2738    partial void OnBoolValueChanging(System.Nullable<bool> value);
2739    partial void OnBoolValueChanged();
2740    partial void OnIntValueChanging(System.Nullable<int> value);
2741    partial void OnIntValueChanged();
2742    partial void OnLongValueChanging(System.Nullable<long> value);
2743    partial void OnLongValueChanged();
2744    partial void OnFloatValueChanging(System.Nullable<float> value);
2745    partial void OnFloatValueChanged();
2746    partial void OnDoubleValueChanging(System.Nullable<double> value);
2747    partial void OnDoubleValueChanged();
2748    partial void OnStringValueChanging(string value);
2749    partial void OnStringValueChanged();
2750    partial void OnBinaryDataIdChanging(System.Nullable<long> value);
2751    partial void OnBinaryDataIdChanged();
2752    #endregion
2753   
2754    public Value()
2755    {
2756      this._BinaryData = default(EntityRef<BinaryData>);
2757      this._DataType = default(EntityRef<DataType>);
2758      this._Run = default(EntityRef<Run>);
2759      this._ValueName = default(EntityRef<ValueName>);
2760      OnCreated();
2761    }
2762   
2763    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
2764    public long Id
2765    {
2766      get
2767      {
2768        return this._Id;
2769      }
2770      set
2771      {
2772        if ((this._Id != value))
2773        {
2774          this.OnIdChanging(value);
2775          this.SendPropertyChanging();
2776          this._Id = value;
2777          this.SendPropertyChanged("Id");
2778          this.OnIdChanged();
2779        }
2780      }
2781    }
2782   
2783    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RunId", DbType="BigInt NOT NULL")]
2784    public long RunId
2785    {
2786      get
2787      {
2788        return this._RunId;
2789      }
2790      set
2791      {
2792        if ((this._RunId != value))
2793        {
2794          if (this._Run.HasLoadedOrAssignedValue)
2795          {
2796            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2797          }
2798          this.OnRunIdChanging(value);
2799          this.SendPropertyChanging();
2800          this._RunId = value;
2801          this.SendPropertyChanged("RunId");
2802          this.OnRunIdChanged();
2803        }
2804      }
2805    }
2806   
2807    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ValueNameId", DbType="BigInt NOT NULL")]
2808    public long ValueNameId
2809    {
2810      get
2811      {
2812        return this._ValueNameId;
2813      }
2814      set
2815      {
2816        if ((this._ValueNameId != value))
2817        {
2818          if (this._ValueName.HasLoadedOrAssignedValue)
2819          {
2820            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2821          }
2822          this.OnValueNameIdChanging(value);
2823          this.SendPropertyChanging();
2824          this._ValueNameId = value;
2825          this.SendPropertyChanged("ValueNameId");
2826          this.OnValueNameIdChanged();
2827        }
2828      }
2829    }
2830   
2831    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataTypeId", DbType="BigInt NOT NULL")]
2832    public long DataTypeId
2833    {
2834      get
2835      {
2836        return this._DataTypeId;
2837      }
2838      set
2839      {
2840        if ((this._DataTypeId != value))
2841        {
2842          if (this._DataType.HasLoadedOrAssignedValue)
2843          {
2844            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2845          }
2846          this.OnDataTypeIdChanging(value);
2847          this.SendPropertyChanging();
2848          this._DataTypeId = value;
2849          this.SendPropertyChanged("DataTypeId");
2850          this.OnDataTypeIdChanged();
2851        }
2852      }
2853    }
2854   
2855    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BoolValue", DbType="Bit")]
2856    public System.Nullable<bool> BoolValue
2857    {
2858      get
2859      {
2860        return this._BoolValue;
2861      }
2862      set
2863      {
2864        if ((this._BoolValue != value))
2865        {
2866          this.OnBoolValueChanging(value);
2867          this.SendPropertyChanging();
2868          this._BoolValue = value;
2869          this.SendPropertyChanged("BoolValue");
2870          this.OnBoolValueChanged();
2871        }
2872      }
2873    }
2874   
2875    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IntValue", DbType="Int")]
2876    public System.Nullable<int> IntValue
2877    {
2878      get
2879      {
2880        return this._IntValue;
2881      }
2882      set
2883      {
2884        if ((this._IntValue != value))
2885        {
2886          this.OnIntValueChanging(value);
2887          this.SendPropertyChanging();
2888          this._IntValue = value;
2889          this.SendPropertyChanged("IntValue");
2890          this.OnIntValueChanged();
2891        }
2892      }
2893    }
2894   
2895    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LongValue", DbType="BigInt")]
2896    public System.Nullable<long> LongValue
2897    {
2898      get
2899      {
2900        return this._LongValue;
2901      }
2902      set
2903      {
2904        if ((this._LongValue != value))
2905        {
2906          this.OnLongValueChanging(value);
2907          this.SendPropertyChanging();
2908          this._LongValue = value;
2909          this.SendPropertyChanged("LongValue");
2910          this.OnLongValueChanged();
2911        }
2912      }
2913    }
2914   
2915    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FloatValue", DbType="Real")]
2916    public System.Nullable<float> FloatValue
2917    {
2918      get
2919      {
2920        return this._FloatValue;
2921      }
2922      set
2923      {
2924        if ((this._FloatValue != value))
2925        {
2926          this.OnFloatValueChanging(value);
2927          this.SendPropertyChanging();
2928          this._FloatValue = value;
2929          this.SendPropertyChanged("FloatValue");
2930          this.OnFloatValueChanged();
2931        }
2932      }
2933    }
2934   
2935    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DoubleValue", DbType="Float")]
2936    public System.Nullable<double> DoubleValue
2937    {
2938      get
2939      {
2940        return this._DoubleValue;
2941      }
2942      set
2943      {
2944        if ((this._DoubleValue != value))
2945        {
2946          this.OnDoubleValueChanging(value);
2947          this.SendPropertyChanging();
2948          this._DoubleValue = value;
2949          this.SendPropertyChanged("DoubleValue");
2950          this.OnDoubleValueChanged();
2951        }
2952      }
2953    }
2954   
2955    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StringValue", DbType="NVarChar(MAX)")]
2956    public string StringValue
2957    {
2958      get
2959      {
2960        return this._StringValue;
2961      }
2962      set
2963      {
2964        if ((this._StringValue != value))
2965        {
2966          this.OnStringValueChanging(value);
2967          this.SendPropertyChanging();
2968          this._StringValue = value;
2969          this.SendPropertyChanged("StringValue");
2970          this.OnStringValueChanged();
2971        }
2972      }
2973    }
2974   
2975    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt")]
2976    public System.Nullable<long> BinaryDataId
2977    {
2978      get
2979      {
2980        return this._BinaryDataId;
2981      }
2982      set
2983      {
2984        if ((this._BinaryDataId != value))
2985        {
2986          if (this._BinaryData.HasLoadedOrAssignedValue)
2987          {
2988            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
2989          }
2990          this.OnBinaryDataIdChanging(value);
2991          this.SendPropertyChanging();
2992          this._BinaryDataId = value;
2993          this.SendPropertyChanged("BinaryDataId");
2994          this.OnBinaryDataIdChanged();
2995        }
2996      }
2997    }
2998   
2999    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Value", Storage="_BinaryData", ThisKey="BinaryDataId", OtherKey="Id", IsForeignKey=true)]
3000    public BinaryData BinaryData
3001    {
3002      get
3003      {
3004        return this._BinaryData.Entity;
3005      }
3006      set
3007      {
3008        BinaryData previousValue = this._BinaryData.Entity;
3009        if (((previousValue != value)
3010              || (this._BinaryData.HasLoadedOrAssignedValue == false)))
3011        {
3012          this.SendPropertyChanging();
3013          if ((previousValue != null))
3014          {
3015            this._BinaryData.Entity = null;
3016            previousValue.Values.Remove(this);
3017          }
3018          this._BinaryData.Entity = value;
3019          if ((value != null))
3020          {
3021            value.Values.Add(this);
3022            this._BinaryDataId = value.Id;
3023          }
3024          else
3025          {
3026            this._BinaryDataId = default(Nullable<long>);
3027          }
3028          this.SendPropertyChanged("BinaryData");
3029        }
3030      }
3031    }
3032   
3033    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Value", Storage="_DataType", ThisKey="DataTypeId", OtherKey="Id", IsForeignKey=true)]
3034    public DataType DataType
3035    {
3036      get
3037      {
3038        return this._DataType.Entity;
3039      }
3040      set
3041      {
3042        DataType previousValue = this._DataType.Entity;
3043        if (((previousValue != value)
3044              || (this._DataType.HasLoadedOrAssignedValue == false)))
3045        {
3046          this.SendPropertyChanging();
3047          if ((previousValue != null))
3048          {
3049            this._DataType.Entity = null;
3050            previousValue.Values.Remove(this);
3051          }
3052          this._DataType.Entity = value;
3053          if ((value != null))
3054          {
3055            value.Values.Add(this);
3056            this._DataTypeId = value.Id;
3057          }
3058          else
3059          {
3060            this._DataTypeId = default(long);
3061          }
3062          this.SendPropertyChanged("DataType");
3063        }
3064      }
3065    }
3066   
3067    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Run_Value", Storage="_Run", ThisKey="RunId", OtherKey="Id", IsForeignKey=true)]
3068    public Run Run
3069    {
3070      get
3071      {
3072        return this._Run.Entity;
3073      }
3074      set
3075      {
3076        Run previousValue = this._Run.Entity;
3077        if (((previousValue != value)
3078              || (this._Run.HasLoadedOrAssignedValue == false)))
3079        {
3080          this.SendPropertyChanging();
3081          if ((previousValue != null))
3082          {
3083            this._Run.Entity = null;
3084            previousValue.Values.Remove(this);
3085          }
3086          this._Run.Entity = value;
3087          if ((value != null))
3088          {
3089            value.Values.Add(this);
3090            this._RunId = value.Id;
3091          }
3092          else
3093          {
3094            this._RunId = default(long);
3095          }
3096          this.SendPropertyChanged("Run");
3097        }
3098      }
3099    }
3100   
3101    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="ValueName_Value", Storage="_ValueName", ThisKey="ValueNameId", OtherKey="Id", IsForeignKey=true)]
3102    public ValueName ValueName
3103    {
3104      get
3105      {
3106        return this._ValueName.Entity;
3107      }
3108      set
3109      {
3110        ValueName previousValue = this._ValueName.Entity;
3111        if (((previousValue != value)
3112              || (this._ValueName.HasLoadedOrAssignedValue == false)))
3113        {
3114          this.SendPropertyChanging();
3115          if ((previousValue != null))
3116          {
3117            this._ValueName.Entity = null;
3118            previousValue.Values.Remove(this);
3119          }
3120          this._ValueName.Entity = value;
3121          if ((value != null))
3122          {
3123            value.Values.Add(this);
3124            this._ValueNameId = value.Id;
3125          }
3126          else
3127          {
3128            this._ValueNameId = default(long);
3129          }
3130          this.SendPropertyChanged("ValueName");
3131        }
3132      }
3133    }
3134   
3135    public event PropertyChangingEventHandler PropertyChanging;
3136   
3137    public event PropertyChangedEventHandler PropertyChanged;
3138   
3139    protected virtual void SendPropertyChanging()
3140    {
3141      if ((this.PropertyChanging != null))
3142      {
3143        this.PropertyChanging(this, emptyChangingEventArgs);
3144      }
3145    }
3146   
3147    protected virtual void SendPropertyChanged(String propertyName)
3148    {
3149      if ((this.PropertyChanged != null))
3150      {
3151        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3152      }
3153    }
3154  }
3155 
3156  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Characteristic")]
3157  public partial class Characteristic : INotifyPropertyChanging, INotifyPropertyChanged
3158  {
3159   
3160    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3161   
3162    private long _Id;
3163   
3164    private string _Name;
3165   
3166    private byte _Type;
3167   
3168    private EntitySet<CharacteristicValue> _CharacteristicValues;
3169   
3170    #region Extensibility Method Definitions
3171    partial void OnLoaded();
3172    partial void OnValidate(System.Data.Linq.ChangeAction action);
3173    partial void OnCreated();
3174    partial void OnIdChanging(long value);
3175    partial void OnIdChanged();
3176    partial void OnNameChanging(string value);
3177    partial void OnNameChanged();
3178    partial void OnTypeChanging(byte value);
3179    partial void OnTypeChanged();
3180    #endregion
3181   
3182    public Characteristic()
3183    {
3184      this._CharacteristicValues = new EntitySet<CharacteristicValue>(new Action<CharacteristicValue>(this.attach_CharacteristicValues), new Action<CharacteristicValue>(this.detach_CharacteristicValues));
3185      OnCreated();
3186    }
3187   
3188    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
3189    public long Id
3190    {
3191      get
3192      {
3193        return this._Id;
3194      }
3195      set
3196      {
3197        if ((this._Id != value))
3198        {
3199          this.OnIdChanging(value);
3200          this.SendPropertyChanging();
3201          this._Id = value;
3202          this.SendPropertyChanged("Id");
3203          this.OnIdChanged();
3204        }
3205      }
3206    }
3207   
3208    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
3209    public string Name
3210    {
3211      get
3212      {
3213        return this._Name;
3214      }
3215      set
3216      {
3217        if ((this._Name != value))
3218        {
3219          this.OnNameChanging(value);
3220          this.SendPropertyChanging();
3221          this._Name = value;
3222          this.SendPropertyChanged("Name");
3223          this.OnNameChanged();
3224        }
3225      }
3226    }
3227   
3228    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="TinyInt NOT NULL")]
3229    public byte Type
3230    {
3231      get
3232      {
3233        return this._Type;
3234      }
3235      set
3236      {
3237        if ((this._Type != value))
3238        {
3239          this.OnTypeChanging(value);
3240          this.SendPropertyChanging();
3241          this._Type = value;
3242          this.SendPropertyChanged("Type");
3243          this.OnTypeChanged();
3244        }
3245      }
3246    }
3247   
3248    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Characteristic_CharacteristicValue", Storage="_CharacteristicValues", ThisKey="Id", OtherKey="CharacteristicId")]
3249    public EntitySet<CharacteristicValue> CharacteristicValues
3250    {
3251      get
3252      {
3253        return this._CharacteristicValues;
3254      }
3255      set
3256      {
3257        this._CharacteristicValues.Assign(value);
3258      }
3259    }
3260   
3261    public event PropertyChangingEventHandler PropertyChanging;
3262   
3263    public event PropertyChangedEventHandler PropertyChanged;
3264   
3265    protected virtual void SendPropertyChanging()
3266    {
3267      if ((this.PropertyChanging != null))
3268      {
3269        this.PropertyChanging(this, emptyChangingEventArgs);
3270      }
3271    }
3272   
3273    protected virtual void SendPropertyChanged(String propertyName)
3274    {
3275      if ((this.PropertyChanged != null))
3276      {
3277        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3278      }
3279    }
3280   
3281    private void attach_CharacteristicValues(CharacteristicValue entity)
3282    {
3283      this.SendPropertyChanging();
3284      entity.Characteristic = this;
3285    }
3286   
3287    private void detach_CharacteristicValues(CharacteristicValue entity)
3288    {
3289      this.SendPropertyChanging();
3290      entity.Characteristic = null;
3291    }
3292  }
3293 
3294  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.CharacteristicValue")]
3295  public partial class CharacteristicValue : INotifyPropertyChanging, INotifyPropertyChanged
3296  {
3297   
3298    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
3299   
3300    private long _Id;
3301   
3302    private long _ProblemId;
3303   
3304    private long _CharacteristicId;
3305   
3306    private long _DataTypeId;
3307   
3308    private System.Nullable<bool> _BoolValue;
3309   
3310    private System.Nullable<int> _IntValue;
3311   
3312    private System.Nullable<long> _LongValue;
3313   
3314    private System.Nullable<float> _FloatValue;
3315   
3316    private System.Nullable<double> _DoubleValue;
3317   
3318    private string _StringValue;
3319   
3320    private EntityRef<Characteristic> _Characteristic;
3321   
3322    private EntityRef<DataType> _DataType;
3323   
3324    private EntityRef<Problem> _Problem;
3325   
3326    #region Extensibility Method Definitions
3327    partial void OnLoaded();
3328    partial void OnValidate(System.Data.Linq.ChangeAction action);
3329    partial void OnCreated();
3330    partial void OnIdChanging(long value);
3331    partial void OnIdChanged();
3332    partial void OnProblemIdChanging(long value);
3333    partial void OnProblemIdChanged();
3334    partial void OnCharacteristicIdChanging(long value);
3335    partial void OnCharacteristicIdChanged();
3336    partial void OnDataTypeIdChanging(long value);
3337    partial void OnDataTypeIdChanged();
3338    partial void OnBoolValueChanging(System.Nullable<bool> value);
3339    partial void OnBoolValueChanged();
3340    partial void OnIntValueChanging(System.Nullable<int> value);
3341    partial void OnIntValueChanged();
3342    partial void OnLongValueChanging(System.Nullable<long> value);
3343    partial void OnLongValueChanged();
3344    partial void OnFloatValueChanging(System.Nullable<float> value);
3345    partial void OnFloatValueChanged();
3346    partial void OnDoubleValueChanging(System.Nullable<double> value);
3347    partial void OnDoubleValueChanged();
3348    partial void OnStringValueChanging(string value);
3349    partial void OnStringValueChanged();
3350    #endregion
3351   
3352    public CharacteristicValue()
3353    {
3354      this._Characteristic = default(EntityRef<Characteristic>);
3355      this._DataType = default(EntityRef<DataType>);
3356      this._Problem = default(EntityRef<Problem>);
3357      OnCreated();
3358    }
3359   
3360    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
3361    public long Id
3362    {
3363      get
3364      {
3365        return this._Id;
3366      }
3367      set
3368      {
3369        if ((this._Id != value))
3370        {
3371          this.OnIdChanging(value);
3372          this.SendPropertyChanging();
3373          this._Id = value;
3374          this.SendPropertyChanged("Id");
3375          this.OnIdChanged();
3376        }
3377      }
3378    }
3379   
3380    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemId", DbType="BigInt NOT NULL")]
3381    public long ProblemId
3382    {
3383      get
3384      {
3385        return this._ProblemId;
3386      }
3387      set
3388      {
3389        if ((this._ProblemId != value))
3390        {
3391          if (this._Problem.HasLoadedOrAssignedValue)
3392          {
3393            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3394          }
3395          this.OnProblemIdChanging(value);
3396          this.SendPropertyChanging();
3397          this._ProblemId = value;
3398          this.SendPropertyChanged("ProblemId");
3399          this.OnProblemIdChanged();
3400        }
3401      }
3402    }
3403   
3404    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CharacteristicId", DbType="BigInt NOT NULL")]
3405    public long CharacteristicId
3406    {
3407      get
3408      {
3409        return this._CharacteristicId;
3410      }
3411      set
3412      {
3413        if ((this._CharacteristicId != value))
3414        {
3415          if (this._Characteristic.HasLoadedOrAssignedValue)
3416          {
3417            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3418          }
3419          this.OnCharacteristicIdChanging(value);
3420          this.SendPropertyChanging();
3421          this._CharacteristicId = value;
3422          this.SendPropertyChanged("CharacteristicId");
3423          this.OnCharacteristicIdChanged();
3424        }
3425      }
3426    }
3427   
3428    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataTypeId", DbType="BigInt NOT NULL")]
3429    public long DataTypeId
3430    {
3431      get
3432      {
3433        return this._DataTypeId;
3434      }
3435      set
3436      {
3437        if ((this._DataTypeId != value))
3438        {
3439          if (this._DataType.HasLoadedOrAssignedValue)
3440          {
3441            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
3442          }
3443          this.OnDataTypeIdChanging(value);
3444          this.SendPropertyChanging();
3445          this._DataTypeId = value;
3446          this.SendPropertyChanged("DataTypeId");
3447          this.OnDataTypeIdChanged();
3448        }
3449      }
3450    }
3451   
3452    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BoolValue", DbType="Bit")]
3453    public System.Nullable<bool> BoolValue
3454    {
3455      get
3456      {
3457        return this._BoolValue;
3458      }
3459      set
3460      {
3461        if ((this._BoolValue != value))
3462        {
3463          this.OnBoolValueChanging(value);
3464          this.SendPropertyChanging();
3465          this._BoolValue = value;
3466          this.SendPropertyChanged("BoolValue");
3467          this.OnBoolValueChanged();
3468        }
3469      }
3470    }
3471   
3472    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IntValue", DbType="Int")]
3473    public System.Nullable<int> IntValue
3474    {
3475      get
3476      {
3477        return this._IntValue;
3478      }
3479      set
3480      {
3481        if ((this._IntValue != value))
3482        {
3483          this.OnIntValueChanging(value);
3484          this.SendPropertyChanging();
3485          this._IntValue = value;
3486          this.SendPropertyChanged("IntValue");
3487          this.OnIntValueChanged();
3488        }
3489      }
3490    }
3491   
3492    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LongValue", DbType="BigInt")]
3493    public System.Nullable<long> LongValue
3494    {
3495      get
3496      {
3497        return this._LongValue;
3498      }
3499      set
3500      {
3501        if ((this._LongValue != value))
3502        {
3503          this.OnLongValueChanging(value);
3504          this.SendPropertyChanging();
3505          this._LongValue = value;
3506          this.SendPropertyChanged("LongValue");
3507          this.OnLongValueChanged();
3508        }
3509      }
3510    }
3511   
3512    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FloatValue", DbType="Real")]
3513    public System.Nullable<float> FloatValue
3514    {
3515      get
3516      {
3517        return this._FloatValue;
3518      }
3519      set
3520      {
3521        if ((this._FloatValue != value))
3522        {
3523          this.OnFloatValueChanging(value);
3524          this.SendPropertyChanging();
3525          this._FloatValue = value;
3526          this.SendPropertyChanged("FloatValue");
3527          this.OnFloatValueChanged();
3528        }
3529      }
3530    }
3531   
3532    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DoubleValue", DbType="Float")]
3533    public System.Nullable<double> DoubleValue
3534    {
3535      get
3536      {
3537        return this._DoubleValue;
3538      }
3539      set
3540      {
3541        if ((this._DoubleValue != value))
3542        {
3543          this.OnDoubleValueChanging(value);
3544          this.SendPropertyChanging();
3545          this._DoubleValue = value;
3546          this.SendPropertyChanged("DoubleValue");
3547          this.OnDoubleValueChanged();
3548        }
3549      }
3550    }
3551   
3552    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StringValue", DbType="NVarChar(MAX)")]
3553    public string StringValue
3554    {
3555      get
3556      {
3557        return this._StringValue;
3558      }
3559      set
3560      {
3561        if ((this._StringValue != value))
3562        {
3563          this.OnStringValueChanging(value);
3564          this.SendPropertyChanging();
3565          this._StringValue = value;
3566          this.SendPropertyChanged("StringValue");
3567          this.OnStringValueChanged();
3568        }
3569      }
3570    }
3571   
3572    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Characteristic_CharacteristicValue", Storage="_Characteristic", ThisKey="CharacteristicId", OtherKey="Id", IsForeignKey=true)]
3573    public Characteristic Characteristic
3574    {
3575      get
3576      {
3577        return this._Characteristic.Entity;
3578      }
3579      set
3580      {
3581        Characteristic previousValue = this._Characteristic.Entity;
3582        if (((previousValue != value)
3583              || (this._Characteristic.HasLoadedOrAssignedValue == false)))
3584        {
3585          this.SendPropertyChanging();
3586          if ((previousValue != null))
3587          {
3588            this._Characteristic.Entity = null;
3589            previousValue.CharacteristicValues.Remove(this);
3590          }
3591          this._Characteristic.Entity = value;
3592          if ((value != null))
3593          {
3594            value.CharacteristicValues.Add(this);
3595            this._CharacteristicId = value.Id;
3596          }
3597          else
3598          {
3599            this._CharacteristicId = default(long);
3600          }
3601          this.SendPropertyChanged("Characteristic");
3602        }
3603      }
3604    }
3605   
3606    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_CharacteristicValue", Storage="_DataType", ThisKey="DataTypeId", OtherKey="Id", IsForeignKey=true)]
3607    public DataType DataType
3608    {
3609      get
3610      {
3611        return this._DataType.Entity;
3612      }
3613      set
3614      {
3615        DataType previousValue = this._DataType.Entity;
3616        if (((previousValue != value)
3617              || (this._DataType.HasLoadedOrAssignedValue == false)))
3618        {
3619          this.SendPropertyChanging();
3620          if ((previousValue != null))
3621          {
3622            this._DataType.Entity = null;
3623            previousValue.CharacteristicValues.Remove(this);
3624          }
3625          this._DataType.Entity = value;
3626          if ((value != null))
3627          {
3628            value.CharacteristicValues.Add(this);
3629            this._DataTypeId = value.Id;
3630          }
3631          else
3632          {
3633            this._DataTypeId = default(long);
3634          }
3635          this.SendPropertyChanged("DataType");
3636        }
3637      }
3638    }
3639   
3640    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_CharacteristicValue", Storage="_Problem", ThisKey="ProblemId", OtherKey="Id", IsForeignKey=true)]
3641    public Problem Problem
3642    {
3643      get
3644      {
3645        return this._Problem.Entity;
3646      }
3647      set
3648      {
3649        Problem previousValue = this._Problem.Entity;
3650        if (((previousValue != value)
3651              || (this._Problem.HasLoadedOrAssignedValue == false)))
3652        {
3653          this.SendPropertyChanging();
3654          if ((previousValue != null))
3655          {
3656            this._Problem.Entity = null;
3657            previousValue.CharacteristicValues.Remove(this);
3658          }
3659          this._Problem.Entity = value;
3660          if ((value != null))
3661          {
3662            value.CharacteristicValues.Add(this);
3663            this._ProblemId = value.Id;
3664          }
3665          else
3666          {
3667            this._ProblemId = default(long);
3668          }
3669          this.SendPropertyChanged("Problem");
3670        }
3671      }
3672    }
3673   
3674    public event PropertyChangingEventHandler PropertyChanging;
3675   
3676    public event PropertyChangedEventHandler PropertyChanged;
3677   
3678    protected virtual void SendPropertyChanging()
3679    {
3680      if ((this.PropertyChanging != null))
3681      {
3682        this.PropertyChanging(this, emptyChangingEventArgs);
3683      }
3684    }
3685   
3686    protected virtual void SendPropertyChanged(String propertyName)
3687    {
3688      if ((this.PropertyChanged != null))
3689      {
3690        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
3691      }
3692    }
3693  }
3694}
3695#pragma warning restore 1591
Note: See TracBrowser for help on using the repository browser.