#pragma warning disable 1591 //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace HeuristicLab.Services.OKB.DataAccess { using System.Data.Linq; using System.Data.Linq.Mapping; using System.Data; using System.Collections.Generic; using System.Reflection; using System.Linq; using System.Linq.Expressions; using System.ComponentModel; using System; [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="HeuristicLab.OKB")] public partial class OKBDataContext : System.Data.Linq.DataContext { private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); #region Extensibility Method Definitions partial void OnCreated(); partial void InsertAlgorithmClass(AlgorithmClass instance); partial void UpdateAlgorithmClass(AlgorithmClass instance); partial void DeleteAlgorithmClass(AlgorithmClass instance); partial void InsertProblemClass(ProblemClass instance); partial void UpdateProblemClass(ProblemClass instance); partial void DeleteProblemClass(ProblemClass instance); partial void InsertAlgorithmUser(AlgorithmUser instance); partial void UpdateAlgorithmUser(AlgorithmUser instance); partial void DeleteAlgorithmUser(AlgorithmUser instance); partial void InsertProblemUser(ProblemUser instance); partial void UpdateProblemUser(ProblemUser instance); partial void DeleteProblemUser(ProblemUser instance); partial void InsertPlatform(Platform instance); partial void UpdatePlatform(Platform instance); partial void DeletePlatform(Platform instance); partial void InsertDataType(DataType instance); partial void UpdateDataType(DataType instance); partial void DeleteDataType(DataType instance); partial void InsertValueName(ValueName instance); partial void UpdateValueName(ValueName instance); partial void DeleteValueName(ValueName instance); partial void InsertAlgorithm(Algorithm instance); partial void UpdateAlgorithm(Algorithm instance); partial void DeleteAlgorithm(Algorithm instance); partial void InsertProblem(Problem instance); partial void UpdateProblem(Problem instance); partial void DeleteProblem(Problem instance); partial void InsertBinaryData(BinaryData instance); partial void UpdateBinaryData(BinaryData instance); partial void DeleteBinaryData(BinaryData instance); partial void InsertRun(Run instance); partial void UpdateRun(Run instance); partial void DeleteRun(Run instance); partial void InsertValue(Value instance); partial void UpdateValue(Value instance); partial void DeleteValue(Value instance); partial void InsertCharacteristic(Characteristic instance); partial void UpdateCharacteristic(Characteristic instance); partial void DeleteCharacteristic(Characteristic instance); partial void InsertCharacteristicValue(CharacteristicValue instance); partial void UpdateCharacteristicValue(CharacteristicValue instance); partial void DeleteCharacteristicValue(CharacteristicValue instance); #endregion public OKBDataContext() : base(global::HeuristicLab.Services.OKB.DataAccess.Properties.Settings.Default.OKBConnectionString, mappingSource) { OnCreated(); } public OKBDataContext(string connection) : base(connection, mappingSource) { OnCreated(); } public OKBDataContext(System.Data.IDbConnection connection) : base(connection, mappingSource) { OnCreated(); } public OKBDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : base(connection, mappingSource) { OnCreated(); } public OKBDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : base(connection, mappingSource) { OnCreated(); } public System.Data.Linq.Table AlgorithmClasses { get { return this.GetTable(); } } public System.Data.Linq.Table ProblemClasses { get { return this.GetTable(); } } public System.Data.Linq.Table AlgorithmUsers { get { return this.GetTable(); } } public System.Data.Linq.Table ProblemUsers { get { return this.GetTable(); } } public System.Data.Linq.Table Platforms { get { return this.GetTable(); } } public System.Data.Linq.Table DataTypes { get { return this.GetTable(); } } public System.Data.Linq.Table ValueNames { get { return this.GetTable(); } } public System.Data.Linq.Table Algorithms { get { return this.GetTable(); } } public System.Data.Linq.Table Problems { get { return this.GetTable(); } } public System.Data.Linq.Table BinaryDatas { get { return this.GetTable(); } } public System.Data.Linq.Table Runs { get { return this.GetTable(); } } public System.Data.Linq.Table Values { get { return this.GetTable(); } } public System.Data.Linq.Table Characteristics { get { return this.GetTable(); } } public System.Data.Linq.Table CharacteristicValues { get { return this.GetTable(); } } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.AlgorithmClass")] public partial class AlgorithmClass : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _Id; private string _Name; private string _Description; private EntitySet _Algorithms; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(long value); partial void OnIdChanged(); partial void OnNameChanging(string value); partial void OnNameChanged(); partial void OnDescriptionChanging(string value); partial void OnDescriptionChanged(); #endregion public AlgorithmClass() { this._Algorithms = new EntitySet(new Action(this.attach_Algorithms), new Action(this.detach_Algorithms)); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public long Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.SendPropertyChanging(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnNameChanging(value); this.SendPropertyChanging(); this._Name = value; this.SendPropertyChanged("Name"); this.OnNameChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")] public string Description { get { return this._Description; } set { if ((this._Description != value)) { this.OnDescriptionChanging(value); this.SendPropertyChanging(); this._Description = value; this.SendPropertyChanged("Description"); this.OnDescriptionChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="AlgorithmClass_Algorithm", Storage="_Algorithms", ThisKey="Id", OtherKey="AlgorithmClassId")] public EntitySet Algorithms { get { return this._Algorithms; } set { this._Algorithms.Assign(value); } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } private void attach_Algorithms(Algorithm entity) { this.SendPropertyChanging(); entity.AlgorithmClass = this; } private void detach_Algorithms(Algorithm entity) { this.SendPropertyChanging(); entity.AlgorithmClass = null; } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ProblemClass")] public partial class ProblemClass : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _Id; private string _Name; private string _Description; private EntitySet _Problems; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(long value); partial void OnIdChanged(); partial void OnNameChanging(string value); partial void OnNameChanged(); partial void OnDescriptionChanging(string value); partial void OnDescriptionChanged(); #endregion public ProblemClass() { this._Problems = new EntitySet(new Action(this.attach_Problems), new Action(this.detach_Problems)); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public long Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.SendPropertyChanging(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnNameChanging(value); this.SendPropertyChanging(); this._Name = value; this.SendPropertyChanged("Name"); this.OnNameChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")] public string Description { get { return this._Description; } set { if ((this._Description != value)) { this.OnDescriptionChanging(value); this.SendPropertyChanging(); this._Description = value; this.SendPropertyChanged("Description"); this.OnDescriptionChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="ProblemClass_Problem", Storage="_Problems", ThisKey="Id", OtherKey="ProblemClassId")] public EntitySet Problems { get { return this._Problems; } set { this._Problems.Assign(value); } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } private void attach_Problems(Problem entity) { this.SendPropertyChanging(); entity.ProblemClass = this; } private void detach_Problems(Problem entity) { this.SendPropertyChanging(); entity.ProblemClass = null; } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.AlgorithmUser")] public partial class AlgorithmUser : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _AlgorithmId; private System.Guid _UserId; private EntityRef _Algorithm; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnAlgorithmIdChanging(long value); partial void OnAlgorithmIdChanged(); partial void OnUserIdChanging(System.Guid value); partial void OnUserIdChanged(); #endregion public AlgorithmUser() { this._Algorithm = default(EntityRef); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AlgorithmId", DbType="BigInt NOT NULL", IsPrimaryKey=true)] public long AlgorithmId { get { return this._AlgorithmId; } set { if ((this._AlgorithmId != value)) { if (this._Algorithm.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnAlgorithmIdChanging(value); this.SendPropertyChanging(); this._AlgorithmId = value; this.SendPropertyChanged("AlgorithmId"); this.OnAlgorithmIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)] public System.Guid UserId { get { return this._UserId; } set { if ((this._UserId != value)) { this.OnUserIdChanging(value); this.SendPropertyChanging(); this._UserId = value; this.SendPropertyChanged("UserId"); this.OnUserIdChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Algorithm_AlgorithmUser", Storage="_Algorithm", ThisKey="AlgorithmId", OtherKey="Id", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")] public Algorithm Algorithm { get { return this._Algorithm.Entity; } set { Algorithm previousValue = this._Algorithm.Entity; if (((previousValue != value) || (this._Algorithm.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Algorithm.Entity = null; previousValue.AlgorithmUsers.Remove(this); } this._Algorithm.Entity = value; if ((value != null)) { value.AlgorithmUsers.Add(this); this._AlgorithmId = value.Id; } else { this._AlgorithmId = default(long); } this.SendPropertyChanged("Algorithm"); } } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ProblemUser")] public partial class ProblemUser : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _ProblemId; private System.Guid _UserId; private EntityRef _Problem; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnProblemIdChanging(long value); partial void OnProblemIdChanged(); partial void OnUserIdChanging(System.Guid value); partial void OnUserIdChanged(); #endregion public ProblemUser() { this._Problem = default(EntityRef); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemId", DbType="BigInt NOT NULL", IsPrimaryKey=true)] public long ProblemId { get { return this._ProblemId; } set { if ((this._ProblemId != value)) { if (this._Problem.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnProblemIdChanging(value); this.SendPropertyChanging(); this._ProblemId = value; this.SendPropertyChanged("ProblemId"); this.OnProblemIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)] public System.Guid UserId { get { return this._UserId; } set { if ((this._UserId != value)) { this.OnUserIdChanging(value); this.SendPropertyChanging(); this._UserId = value; this.SendPropertyChanged("UserId"); this.OnUserIdChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_ProblemUser", Storage="_Problem", ThisKey="ProblemId", OtherKey="Id", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")] public Problem Problem { get { return this._Problem.Entity; } set { Problem previousValue = this._Problem.Entity; if (((previousValue != value) || (this._Problem.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Problem.Entity = null; previousValue.ProblemUsers.Remove(this); } this._Problem.Entity = value; if ((value != null)) { value.ProblemUsers.Add(this); this._ProblemId = value.Id; } else { this._ProblemId = default(long); } this.SendPropertyChanged("Problem"); } } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Platform")] public partial class Platform : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _Id; private string _Name; private string _Description; private EntitySet _Algorithms; private EntitySet _Problems; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(long value); partial void OnIdChanged(); partial void OnNameChanging(string value); partial void OnNameChanged(); partial void OnDescriptionChanging(string value); partial void OnDescriptionChanged(); #endregion public Platform() { this._Algorithms = new EntitySet(new Action(this.attach_Algorithms), new Action(this.detach_Algorithms)); this._Problems = new EntitySet(new Action(this.attach_Problems), new Action(this.detach_Problems)); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public long Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.SendPropertyChanging(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnNameChanging(value); this.SendPropertyChanging(); this._Name = value; this.SendPropertyChanged("Name"); this.OnNameChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")] public string Description { get { return this._Description; } set { if ((this._Description != value)) { this.OnDescriptionChanging(value); this.SendPropertyChanging(); this._Description = value; this.SendPropertyChanged("Description"); this.OnDescriptionChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_Algorithm", Storage="_Algorithms", ThisKey="Id", OtherKey="PlatformId")] public EntitySet Algorithms { get { return this._Algorithms; } set { this._Algorithms.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_Problem", Storage="_Problems", ThisKey="Id", OtherKey="PlatformId")] public EntitySet Problems { get { return this._Problems; } set { this._Problems.Assign(value); } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } private void attach_Algorithms(Algorithm entity) { this.SendPropertyChanging(); entity.Platform = this; } private void detach_Algorithms(Algorithm entity) { this.SendPropertyChanging(); entity.Platform = null; } private void attach_Problems(Problem entity) { this.SendPropertyChanging(); entity.Platform = this; } private void detach_Problems(Problem entity) { this.SendPropertyChanging(); entity.Platform = null; } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.DataType")] public partial class DataType : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _Id; private string _Name; private string _TypeName; private EntitySet _Algorithms; private EntitySet _Problems; private EntitySet _Values; private EntitySet _CharacteristicValues; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(long value); partial void OnIdChanged(); partial void OnNameChanging(string value); partial void OnNameChanged(); partial void OnTypeNameChanging(string value); partial void OnTypeNameChanged(); #endregion public DataType() { this._Algorithms = new EntitySet(new Action(this.attach_Algorithms), new Action(this.detach_Algorithms)); this._Problems = new EntitySet(new Action(this.attach_Problems), new Action(this.detach_Problems)); this._Values = new EntitySet(new Action(this.attach_Values), new Action(this.detach_Values)); this._CharacteristicValues = new EntitySet(new Action(this.attach_CharacteristicValues), new Action(this.detach_CharacteristicValues)); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public long Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.SendPropertyChanging(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnNameChanging(value); this.SendPropertyChanging(); this._Name = value; this.SendPropertyChanged("Name"); this.OnNameChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeName", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)] public string TypeName { get { return this._TypeName; } set { if ((this._TypeName != value)) { this.OnTypeNameChanging(value); this.SendPropertyChanging(); this._TypeName = value; this.SendPropertyChanged("TypeName"); this.OnTypeNameChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Algorithm", Storage="_Algorithms", ThisKey="Id", OtherKey="DataTypeId")] public EntitySet Algorithms { get { return this._Algorithms; } set { this._Algorithms.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Problem", Storage="_Problems", ThisKey="Id", OtherKey="DataTypeId")] public EntitySet Problems { get { return this._Problems; } set { this._Problems.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Value", Storage="_Values", ThisKey="Id", OtherKey="DataTypeId")] public EntitySet Values { get { return this._Values; } set { this._Values.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_CharacteristicValue", Storage="_CharacteristicValues", ThisKey="Id", OtherKey="DataTypeId")] public EntitySet CharacteristicValues { get { return this._CharacteristicValues; } set { this._CharacteristicValues.Assign(value); } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } private void attach_Algorithms(Algorithm entity) { this.SendPropertyChanging(); entity.DataType = this; } private void detach_Algorithms(Algorithm entity) { this.SendPropertyChanging(); entity.DataType = null; } private void attach_Problems(Problem entity) { this.SendPropertyChanging(); entity.DataType = this; } private void detach_Problems(Problem entity) { this.SendPropertyChanging(); entity.DataType = null; } private void attach_Values(Value entity) { this.SendPropertyChanging(); entity.DataType = this; } private void detach_Values(Value entity) { this.SendPropertyChanging(); entity.DataType = null; } private void attach_CharacteristicValues(CharacteristicValue entity) { this.SendPropertyChanging(); entity.DataType = this; } private void detach_CharacteristicValues(CharacteristicValue entity) { this.SendPropertyChanging(); entity.DataType = null; } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ValueName")] public partial class ValueName : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _Id; private string _Name; private ValueNameCategory _Category; private ValueNameType _Type; private EntitySet _Values; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(long value); partial void OnIdChanged(); partial void OnNameChanging(string value); partial void OnNameChanged(); partial void OnCategoryChanging(ValueNameCategory value); partial void OnCategoryChanged(); partial void OnTypeChanging(ValueNameType value); partial void OnTypeChanged(); #endregion public ValueName() { this._Values = new EntitySet(new Action(this.attach_Values), new Action(this.detach_Values)); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public long Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.SendPropertyChanging(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnNameChanging(value); this.SendPropertyChanging(); this._Name = value; this.SendPropertyChanged("Name"); this.OnNameChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Category", DbType="TinyInt NOT NULL", CanBeNull=false)] public ValueNameCategory Category { get { return this._Category; } set { if ((this._Category != value)) { this.OnCategoryChanging(value); this.SendPropertyChanging(); this._Category = value; this.SendPropertyChanged("Category"); this.OnCategoryChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="TinyInt NOT NULL", CanBeNull=false)] public ValueNameType Type { get { return this._Type; } set { if ((this._Type != value)) { this.OnTypeChanging(value); this.SendPropertyChanging(); this._Type = value; this.SendPropertyChanged("Type"); this.OnTypeChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="ValueName_Value", Storage="_Values", ThisKey="Id", OtherKey="ValueNameId")] public EntitySet Values { get { return this._Values; } set { this._Values.Assign(value); } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } private void attach_Values(Value entity) { this.SendPropertyChanging(); entity.ValueName = this; } private void detach_Values(Value entity) { this.SendPropertyChanging(); entity.ValueName = null; } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Algorithm")] public partial class Algorithm : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _Id; private long _AlgorithmClassId; private long _PlatformId; private long _DataTypeId; private System.Nullable _BinaryDataId; private string _Name; private string _Description; private EntitySet _AlgorithmUsers; private EntitySet _Runs; private EntityRef _AlgorithmClass; private EntityRef _DataType; private EntityRef _Platform; private EntityRef _BinaryData; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(long value); partial void OnIdChanged(); partial void OnAlgorithmClassIdChanging(long value); partial void OnAlgorithmClassIdChanged(); partial void OnPlatformIdChanging(long value); partial void OnPlatformIdChanged(); partial void OnDataTypeIdChanging(long value); partial void OnDataTypeIdChanged(); partial void OnBinaryDataIdChanging(System.Nullable value); partial void OnBinaryDataIdChanged(); partial void OnNameChanging(string value); partial void OnNameChanged(); partial void OnDescriptionChanging(string value); partial void OnDescriptionChanged(); #endregion public Algorithm() { this._AlgorithmUsers = new EntitySet(new Action(this.attach_AlgorithmUsers), new Action(this.detach_AlgorithmUsers)); this._Runs = new EntitySet(new Action(this.attach_Runs), new Action(this.detach_Runs)); this._AlgorithmClass = default(EntityRef); this._DataType = default(EntityRef); this._Platform = default(EntityRef); this._BinaryData = default(EntityRef); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public long Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.SendPropertyChanging(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AlgorithmClassId", DbType="BigInt NOT NULL")] public long AlgorithmClassId { get { return this._AlgorithmClassId; } set { if ((this._AlgorithmClassId != value)) { if (this._AlgorithmClass.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnAlgorithmClassIdChanging(value); this.SendPropertyChanging(); this._AlgorithmClassId = value; this.SendPropertyChanged("AlgorithmClassId"); this.OnAlgorithmClassIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlatformId", DbType="BigInt NOT NULL")] public long PlatformId { get { return this._PlatformId; } set { if ((this._PlatformId != value)) { if (this._Platform.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnPlatformIdChanging(value); this.SendPropertyChanging(); this._PlatformId = value; this.SendPropertyChanged("PlatformId"); this.OnPlatformIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataTypeId", DbType="BigInt NOT NULL")] public long DataTypeId { get { return this._DataTypeId; } set { if ((this._DataTypeId != value)) { if (this._DataType.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnDataTypeIdChanging(value); this.SendPropertyChanging(); this._DataTypeId = value; this.SendPropertyChanged("DataTypeId"); this.OnDataTypeIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt")] public System.Nullable BinaryDataId { get { return this._BinaryDataId; } set { if ((this._BinaryDataId != value)) { if (this._BinaryData.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnBinaryDataIdChanging(value); this.SendPropertyChanging(); this._BinaryDataId = value; this.SendPropertyChanged("BinaryDataId"); this.OnBinaryDataIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnNameChanging(value); this.SendPropertyChanging(); this._Name = value; this.SendPropertyChanged("Name"); this.OnNameChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")] public string Description { get { return this._Description; } set { if ((this._Description != value)) { this.OnDescriptionChanging(value); this.SendPropertyChanging(); this._Description = value; this.SendPropertyChanged("Description"); this.OnDescriptionChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Algorithm_AlgorithmUser", Storage="_AlgorithmUsers", ThisKey="Id", OtherKey="AlgorithmId")] public EntitySet AlgorithmUsers { get { return this._AlgorithmUsers; } set { this._AlgorithmUsers.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Algorithm_Run", Storage="_Runs", ThisKey="Id", OtherKey="AlgorithmId")] public EntitySet Runs { get { return this._Runs; } set { this._Runs.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="AlgorithmClass_Algorithm", Storage="_AlgorithmClass", ThisKey="AlgorithmClassId", OtherKey="Id", IsForeignKey=true)] public AlgorithmClass AlgorithmClass { get { return this._AlgorithmClass.Entity; } set { AlgorithmClass previousValue = this._AlgorithmClass.Entity; if (((previousValue != value) || (this._AlgorithmClass.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._AlgorithmClass.Entity = null; previousValue.Algorithms.Remove(this); } this._AlgorithmClass.Entity = value; if ((value != null)) { value.Algorithms.Add(this); this._AlgorithmClassId = value.Id; } else { this._AlgorithmClassId = default(long); } this.SendPropertyChanged("AlgorithmClass"); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Algorithm", Storage="_DataType", ThisKey="DataTypeId", OtherKey="Id", IsForeignKey=true)] public DataType DataType { get { return this._DataType.Entity; } set { DataType previousValue = this._DataType.Entity; if (((previousValue != value) || (this._DataType.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._DataType.Entity = null; previousValue.Algorithms.Remove(this); } this._DataType.Entity = value; if ((value != null)) { value.Algorithms.Add(this); this._DataTypeId = value.Id; } else { this._DataTypeId = default(long); } this.SendPropertyChanged("DataType"); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_Algorithm", Storage="_Platform", ThisKey="PlatformId", OtherKey="Id", IsForeignKey=true)] public Platform Platform { get { return this._Platform.Entity; } set { Platform previousValue = this._Platform.Entity; if (((previousValue != value) || (this._Platform.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Platform.Entity = null; previousValue.Algorithms.Remove(this); } this._Platform.Entity = value; if ((value != null)) { value.Algorithms.Add(this); this._PlatformId = value.Id; } else { this._PlatformId = default(long); } this.SendPropertyChanged("Platform"); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Algorithm", Storage="_BinaryData", ThisKey="BinaryDataId", OtherKey="Id", IsForeignKey=true)] public BinaryData BinaryData { get { return this._BinaryData.Entity; } set { BinaryData previousValue = this._BinaryData.Entity; if (((previousValue != value) || (this._BinaryData.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._BinaryData.Entity = null; previousValue.Algorithms.Remove(this); } this._BinaryData.Entity = value; if ((value != null)) { value.Algorithms.Add(this); this._BinaryDataId = value.Id; } else { this._BinaryDataId = default(Nullable); } this.SendPropertyChanged("BinaryData"); } } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } private void attach_AlgorithmUsers(AlgorithmUser entity) { this.SendPropertyChanging(); entity.Algorithm = this; } private void detach_AlgorithmUsers(AlgorithmUser entity) { this.SendPropertyChanging(); entity.Algorithm = null; } private void attach_Runs(Run entity) { this.SendPropertyChanging(); entity.Algorithm = this; } private void detach_Runs(Run entity) { this.SendPropertyChanging(); entity.Algorithm = null; } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Problem")] public partial class Problem : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _Id; private long _ProblemClassId; private long _PlatformId; private long _DataTypeId; private System.Nullable _BinaryDataId; private string _Name; private string _Description; private EntitySet _ProblemUsers; private EntitySet _Runs; private EntitySet _CharacteristicValues; private EntityRef _DataType; private EntityRef _Platform; private EntityRef _ProblemClass; private EntityRef _BinaryData; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(long value); partial void OnIdChanged(); partial void OnProblemClassIdChanging(long value); partial void OnProblemClassIdChanged(); partial void OnPlatformIdChanging(long value); partial void OnPlatformIdChanged(); partial void OnDataTypeIdChanging(long value); partial void OnDataTypeIdChanged(); partial void OnBinaryDataIdChanging(System.Nullable value); partial void OnBinaryDataIdChanged(); partial void OnNameChanging(string value); partial void OnNameChanged(); partial void OnDescriptionChanging(string value); partial void OnDescriptionChanged(); #endregion public Problem() { this._ProblemUsers = new EntitySet(new Action(this.attach_ProblemUsers), new Action(this.detach_ProblemUsers)); this._Runs = new EntitySet(new Action(this.attach_Runs), new Action(this.detach_Runs)); this._CharacteristicValues = new EntitySet(new Action(this.attach_CharacteristicValues), new Action(this.detach_CharacteristicValues)); this._DataType = default(EntityRef); this._Platform = default(EntityRef); this._ProblemClass = default(EntityRef); this._BinaryData = default(EntityRef); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public long Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.SendPropertyChanging(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemClassId", DbType="BigInt NOT NULL")] public long ProblemClassId { get { return this._ProblemClassId; } set { if ((this._ProblemClassId != value)) { if (this._ProblemClass.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnProblemClassIdChanging(value); this.SendPropertyChanging(); this._ProblemClassId = value; this.SendPropertyChanged("ProblemClassId"); this.OnProblemClassIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlatformId", DbType="BigInt NOT NULL")] public long PlatformId { get { return this._PlatformId; } set { if ((this._PlatformId != value)) { if (this._Platform.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnPlatformIdChanging(value); this.SendPropertyChanging(); this._PlatformId = value; this.SendPropertyChanged("PlatformId"); this.OnPlatformIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataTypeId", DbType="BigInt NOT NULL")] public long DataTypeId { get { return this._DataTypeId; } set { if ((this._DataTypeId != value)) { if (this._DataType.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnDataTypeIdChanging(value); this.SendPropertyChanging(); this._DataTypeId = value; this.SendPropertyChanged("DataTypeId"); this.OnDataTypeIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt")] public System.Nullable BinaryDataId { get { return this._BinaryDataId; } set { if ((this._BinaryDataId != value)) { if (this._BinaryData.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnBinaryDataIdChanging(value); this.SendPropertyChanging(); this._BinaryDataId = value; this.SendPropertyChanged("BinaryDataId"); this.OnBinaryDataIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnNameChanging(value); this.SendPropertyChanging(); this._Name = value; this.SendPropertyChanged("Name"); this.OnNameChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")] public string Description { get { return this._Description; } set { if ((this._Description != value)) { this.OnDescriptionChanging(value); this.SendPropertyChanging(); this._Description = value; this.SendPropertyChanged("Description"); this.OnDescriptionChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_ProblemUser", Storage="_ProblemUsers", ThisKey="Id", OtherKey="ProblemId")] public EntitySet ProblemUsers { get { return this._ProblemUsers; } set { this._ProblemUsers.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_Run", Storage="_Runs", ThisKey="Id", OtherKey="ProblemId")] public EntitySet Runs { get { return this._Runs; } set { this._Runs.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_CharacteristicValue", Storage="_CharacteristicValues", ThisKey="Id", OtherKey="ProblemId")] public EntitySet CharacteristicValues { get { return this._CharacteristicValues; } set { this._CharacteristicValues.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Problem", Storage="_DataType", ThisKey="DataTypeId", OtherKey="Id", IsForeignKey=true)] public DataType DataType { get { return this._DataType.Entity; } set { DataType previousValue = this._DataType.Entity; if (((previousValue != value) || (this._DataType.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._DataType.Entity = null; previousValue.Problems.Remove(this); } this._DataType.Entity = value; if ((value != null)) { value.Problems.Add(this); this._DataTypeId = value.Id; } else { this._DataTypeId = default(long); } this.SendPropertyChanged("DataType"); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Platform_Problem", Storage="_Platform", ThisKey="PlatformId", OtherKey="Id", IsForeignKey=true)] public Platform Platform { get { return this._Platform.Entity; } set { Platform previousValue = this._Platform.Entity; if (((previousValue != value) || (this._Platform.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Platform.Entity = null; previousValue.Problems.Remove(this); } this._Platform.Entity = value; if ((value != null)) { value.Problems.Add(this); this._PlatformId = value.Id; } else { this._PlatformId = default(long); } this.SendPropertyChanged("Platform"); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="ProblemClass_Problem", Storage="_ProblemClass", ThisKey="ProblemClassId", OtherKey="Id", IsForeignKey=true)] public ProblemClass ProblemClass { get { return this._ProblemClass.Entity; } set { ProblemClass previousValue = this._ProblemClass.Entity; if (((previousValue != value) || (this._ProblemClass.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._ProblemClass.Entity = null; previousValue.Problems.Remove(this); } this._ProblemClass.Entity = value; if ((value != null)) { value.Problems.Add(this); this._ProblemClassId = value.Id; } else { this._ProblemClassId = default(long); } this.SendPropertyChanged("ProblemClass"); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Problem", Storage="_BinaryData", ThisKey="BinaryDataId", OtherKey="Id", IsForeignKey=true)] public BinaryData BinaryData { get { return this._BinaryData.Entity; } set { BinaryData previousValue = this._BinaryData.Entity; if (((previousValue != value) || (this._BinaryData.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._BinaryData.Entity = null; previousValue.Problems.Remove(this); } this._BinaryData.Entity = value; if ((value != null)) { value.Problems.Add(this); this._BinaryDataId = value.Id; } else { this._BinaryDataId = default(Nullable); } this.SendPropertyChanged("BinaryData"); } } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } private void attach_ProblemUsers(ProblemUser entity) { this.SendPropertyChanging(); entity.Problem = this; } private void detach_ProblemUsers(ProblemUser entity) { this.SendPropertyChanging(); entity.Problem = null; } private void attach_Runs(Run entity) { this.SendPropertyChanging(); entity.Problem = this; } private void detach_Runs(Run entity) { this.SendPropertyChanging(); entity.Problem = null; } private void attach_CharacteristicValues(CharacteristicValue entity) { this.SendPropertyChanging(); entity.Problem = this; } private void detach_CharacteristicValues(CharacteristicValue entity) { this.SendPropertyChanging(); entity.Problem = null; } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.BinaryData")] public partial class BinaryData : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _Id; private System.Data.Linq.Binary _Data; private byte[] _Hash; private EntitySet _Algorithms; private EntitySet _Problems; private EntitySet _Values; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(long value); partial void OnIdChanged(); partial void OnDataChanging(System.Data.Linq.Binary value); partial void OnDataChanged(); partial void OnHashChanging(byte[] value); partial void OnHashChanged(); #endregion public BinaryData() { this._Algorithms = new EntitySet(new Action(this.attach_Algorithms), new Action(this.detach_Algorithms)); this._Problems = new EntitySet(new Action(this.attach_Problems), new Action(this.detach_Problems)); this._Values = new EntitySet(new Action(this.attach_Values), new Action(this.detach_Values)); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public long Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.SendPropertyChanging(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="VarBinary(MAX) NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)] public System.Data.Linq.Binary Data { get { return this._Data; } set { if ((this._Data != value)) { this.OnDataChanging(value); this.SendPropertyChanging(); this._Data = value; this.SendPropertyChanged("Data"); this.OnDataChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Hash", DbType="VarBinary(20) NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)] public byte[] Hash { get { return this._Hash; } set { if ((this._Hash != value)) { this.OnHashChanging(value); this.SendPropertyChanging(); this._Hash = value; this.SendPropertyChanged("Hash"); this.OnHashChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Algorithm", Storage="_Algorithms", ThisKey="Id", OtherKey="BinaryDataId")] public EntitySet Algorithms { get { return this._Algorithms; } set { this._Algorithms.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Problem", Storage="_Problems", ThisKey="Id", OtherKey="BinaryDataId")] public EntitySet Problems { get { return this._Problems; } set { this._Problems.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Value", Storage="_Values", ThisKey="Id", OtherKey="BinaryDataId")] public EntitySet Values { get { return this._Values; } set { this._Values.Assign(value); } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } private void attach_Algorithms(Algorithm entity) { this.SendPropertyChanging(); entity.BinaryData = this; } private void detach_Algorithms(Algorithm entity) { this.SendPropertyChanging(); entity.BinaryData = null; } private void attach_Problems(Problem entity) { this.SendPropertyChanging(); entity.BinaryData = this; } private void detach_Problems(Problem entity) { this.SendPropertyChanging(); entity.BinaryData = null; } private void attach_Values(Value entity) { this.SendPropertyChanging(); entity.BinaryData = this; } private void detach_Values(Value entity) { this.SendPropertyChanging(); entity.BinaryData = null; } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Run")] public partial class Run : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _Id; private long _AlgorithmId; private long _ProblemId; private int _RandomSeed; private System.DateTime _CreatedDate; private System.Guid _UserId; private System.Guid _ClientId; private EntitySet _Values; private EntityRef _Algorithm; private EntityRef _Problem; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(long value); partial void OnIdChanged(); partial void OnAlgorithmIdChanging(long value); partial void OnAlgorithmIdChanged(); partial void OnProblemIdChanging(long value); partial void OnProblemIdChanged(); partial void OnRandomSeedChanging(int value); partial void OnRandomSeedChanged(); partial void OnCreatedDateChanging(System.DateTime value); partial void OnCreatedDateChanged(); partial void OnUserIdChanging(System.Guid value); partial void OnUserIdChanged(); partial void OnClientIdChanging(System.Guid value); partial void OnClientIdChanged(); #endregion public Run() { this._Values = new EntitySet(new Action(this.attach_Values), new Action(this.detach_Values)); this._Algorithm = default(EntityRef); this._Problem = default(EntityRef); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public long Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.SendPropertyChanging(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AlgorithmId", DbType="BigInt NOT NULL")] public long AlgorithmId { get { return this._AlgorithmId; } set { if ((this._AlgorithmId != value)) { if (this._Algorithm.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnAlgorithmIdChanging(value); this.SendPropertyChanging(); this._AlgorithmId = value; this.SendPropertyChanged("AlgorithmId"); this.OnAlgorithmIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemId", DbType="BigInt NOT NULL")] public long ProblemId { get { return this._ProblemId; } set { if ((this._ProblemId != value)) { if (this._Problem.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnProblemIdChanging(value); this.SendPropertyChanging(); this._ProblemId = value; this.SendPropertyChanged("ProblemId"); this.OnProblemIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RandomSeed", DbType="Int NOT NULL")] public int RandomSeed { get { return this._RandomSeed; } set { if ((this._RandomSeed != value)) { this.OnRandomSeedChanging(value); this.SendPropertyChanging(); this._RandomSeed = value; this.SendPropertyChanged("RandomSeed"); this.OnRandomSeedChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreatedDate", DbType="DateTime2 NOT NULL")] public System.DateTime CreatedDate { get { return this._CreatedDate; } set { if ((this._CreatedDate != value)) { this.OnCreatedDateChanging(value); this.SendPropertyChanging(); this._CreatedDate = value; this.SendPropertyChanged("CreatedDate"); this.OnCreatedDateChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL")] public System.Guid UserId { get { return this._UserId; } set { if ((this._UserId != value)) { this.OnUserIdChanging(value); this.SendPropertyChanging(); this._UserId = value; this.SendPropertyChanged("UserId"); this.OnUserIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClientId", DbType="UniqueIdentifier NOT NULL")] public System.Guid ClientId { get { return this._ClientId; } set { if ((this._ClientId != value)) { this.OnClientIdChanging(value); this.SendPropertyChanging(); this._ClientId = value; this.SendPropertyChanged("ClientId"); this.OnClientIdChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Run_Value", Storage="_Values", ThisKey="Id", OtherKey="RunId")] public EntitySet Values { get { return this._Values; } set { this._Values.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Algorithm_Run", Storage="_Algorithm", ThisKey="AlgorithmId", OtherKey="Id", IsForeignKey=true)] public Algorithm Algorithm { get { return this._Algorithm.Entity; } set { Algorithm previousValue = this._Algorithm.Entity; if (((previousValue != value) || (this._Algorithm.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Algorithm.Entity = null; previousValue.Runs.Remove(this); } this._Algorithm.Entity = value; if ((value != null)) { value.Runs.Add(this); this._AlgorithmId = value.Id; } else { this._AlgorithmId = default(long); } this.SendPropertyChanged("Algorithm"); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_Run", Storage="_Problem", ThisKey="ProblemId", OtherKey="Id", IsForeignKey=true)] public Problem Problem { get { return this._Problem.Entity; } set { Problem previousValue = this._Problem.Entity; if (((previousValue != value) || (this._Problem.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Problem.Entity = null; previousValue.Runs.Remove(this); } this._Problem.Entity = value; if ((value != null)) { value.Runs.Add(this); this._ProblemId = value.Id; } else { this._ProblemId = default(long); } this.SendPropertyChanged("Problem"); } } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } private void attach_Values(Value entity) { this.SendPropertyChanging(); entity.Run = this; } private void detach_Values(Value entity) { this.SendPropertyChanging(); entity.Run = null; } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Value")] public partial class Value : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _Id; private long _RunId; private long _ValueNameId; private long _DataTypeId; private System.Nullable _BoolValue; private System.Nullable _IntValue; private System.Nullable _LongValue; private System.Nullable _FloatValue; private System.Nullable _DoubleValue; private string _StringValue; private System.Nullable _BinaryDataId; private EntityRef _BinaryData; private EntityRef _DataType; private EntityRef _Run; private EntityRef _ValueName; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(long value); partial void OnIdChanged(); partial void OnRunIdChanging(long value); partial void OnRunIdChanged(); partial void OnValueNameIdChanging(long value); partial void OnValueNameIdChanged(); partial void OnDataTypeIdChanging(long value); partial void OnDataTypeIdChanged(); partial void OnBoolValueChanging(System.Nullable value); partial void OnBoolValueChanged(); partial void OnIntValueChanging(System.Nullable value); partial void OnIntValueChanged(); partial void OnLongValueChanging(System.Nullable value); partial void OnLongValueChanged(); partial void OnFloatValueChanging(System.Nullable value); partial void OnFloatValueChanged(); partial void OnDoubleValueChanging(System.Nullable value); partial void OnDoubleValueChanged(); partial void OnStringValueChanging(string value); partial void OnStringValueChanged(); partial void OnBinaryDataIdChanging(System.Nullable value); partial void OnBinaryDataIdChanged(); #endregion public Value() { this._BinaryData = default(EntityRef); this._DataType = default(EntityRef); this._Run = default(EntityRef); this._ValueName = default(EntityRef); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public long Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.SendPropertyChanging(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RunId", DbType="BigInt NOT NULL")] public long RunId { get { return this._RunId; } set { if ((this._RunId != value)) { if (this._Run.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnRunIdChanging(value); this.SendPropertyChanging(); this._RunId = value; this.SendPropertyChanged("RunId"); this.OnRunIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ValueNameId", DbType="BigInt NOT NULL")] public long ValueNameId { get { return this._ValueNameId; } set { if ((this._ValueNameId != value)) { if (this._ValueName.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnValueNameIdChanging(value); this.SendPropertyChanging(); this._ValueNameId = value; this.SendPropertyChanged("ValueNameId"); this.OnValueNameIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataTypeId", DbType="BigInt NOT NULL")] public long DataTypeId { get { return this._DataTypeId; } set { if ((this._DataTypeId != value)) { if (this._DataType.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnDataTypeIdChanging(value); this.SendPropertyChanging(); this._DataTypeId = value; this.SendPropertyChanged("DataTypeId"); this.OnDataTypeIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BoolValue", DbType="Bit")] public System.Nullable BoolValue { get { return this._BoolValue; } set { if ((this._BoolValue != value)) { this.OnBoolValueChanging(value); this.SendPropertyChanging(); this._BoolValue = value; this.SendPropertyChanged("BoolValue"); this.OnBoolValueChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IntValue", DbType="Int")] public System.Nullable IntValue { get { return this._IntValue; } set { if ((this._IntValue != value)) { this.OnIntValueChanging(value); this.SendPropertyChanging(); this._IntValue = value; this.SendPropertyChanged("IntValue"); this.OnIntValueChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LongValue", DbType="BigInt")] public System.Nullable LongValue { get { return this._LongValue; } set { if ((this._LongValue != value)) { this.OnLongValueChanging(value); this.SendPropertyChanging(); this._LongValue = value; this.SendPropertyChanged("LongValue"); this.OnLongValueChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FloatValue", DbType="Real")] public System.Nullable FloatValue { get { return this._FloatValue; } set { if ((this._FloatValue != value)) { this.OnFloatValueChanging(value); this.SendPropertyChanging(); this._FloatValue = value; this.SendPropertyChanged("FloatValue"); this.OnFloatValueChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DoubleValue", DbType="Float")] public System.Nullable DoubleValue { get { return this._DoubleValue; } set { if ((this._DoubleValue != value)) { this.OnDoubleValueChanging(value); this.SendPropertyChanging(); this._DoubleValue = value; this.SendPropertyChanged("DoubleValue"); this.OnDoubleValueChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StringValue", DbType="NVarChar(MAX)")] public string StringValue { get { return this._StringValue; } set { if ((this._StringValue != value)) { this.OnStringValueChanging(value); this.SendPropertyChanging(); this._StringValue = value; this.SendPropertyChanged("StringValue"); this.OnStringValueChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BinaryDataId", DbType="BigInt")] public System.Nullable BinaryDataId { get { return this._BinaryDataId; } set { if ((this._BinaryDataId != value)) { if (this._BinaryData.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnBinaryDataIdChanging(value); this.SendPropertyChanging(); this._BinaryDataId = value; this.SendPropertyChanged("BinaryDataId"); this.OnBinaryDataIdChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="BinaryData_Value", Storage="_BinaryData", ThisKey="BinaryDataId", OtherKey="Id", IsForeignKey=true)] public BinaryData BinaryData { get { return this._BinaryData.Entity; } set { BinaryData previousValue = this._BinaryData.Entity; if (((previousValue != value) || (this._BinaryData.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._BinaryData.Entity = null; previousValue.Values.Remove(this); } this._BinaryData.Entity = value; if ((value != null)) { value.Values.Add(this); this._BinaryDataId = value.Id; } else { this._BinaryDataId = default(Nullable); } this.SendPropertyChanged("BinaryData"); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_Value", Storage="_DataType", ThisKey="DataTypeId", OtherKey="Id", IsForeignKey=true)] public DataType DataType { get { return this._DataType.Entity; } set { DataType previousValue = this._DataType.Entity; if (((previousValue != value) || (this._DataType.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._DataType.Entity = null; previousValue.Values.Remove(this); } this._DataType.Entity = value; if ((value != null)) { value.Values.Add(this); this._DataTypeId = value.Id; } else { this._DataTypeId = default(long); } this.SendPropertyChanged("DataType"); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Run_Value", Storage="_Run", ThisKey="RunId", OtherKey="Id", IsForeignKey=true)] public Run Run { get { return this._Run.Entity; } set { Run previousValue = this._Run.Entity; if (((previousValue != value) || (this._Run.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Run.Entity = null; previousValue.Values.Remove(this); } this._Run.Entity = value; if ((value != null)) { value.Values.Add(this); this._RunId = value.Id; } else { this._RunId = default(long); } this.SendPropertyChanged("Run"); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="ValueName_Value", Storage="_ValueName", ThisKey="ValueNameId", OtherKey="Id", IsForeignKey=true)] public ValueName ValueName { get { return this._ValueName.Entity; } set { ValueName previousValue = this._ValueName.Entity; if (((previousValue != value) || (this._ValueName.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._ValueName.Entity = null; previousValue.Values.Remove(this); } this._ValueName.Entity = value; if ((value != null)) { value.Values.Add(this); this._ValueNameId = value.Id; } else { this._ValueNameId = default(long); } this.SendPropertyChanged("ValueName"); } } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Characteristic")] public partial class Characteristic : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _Id; private string _Name; private byte _Type; private EntitySet _CharacteristicValues; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(long value); partial void OnIdChanged(); partial void OnNameChanging(string value); partial void OnNameChanged(); partial void OnTypeChanging(byte value); partial void OnTypeChanged(); #endregion public Characteristic() { this._CharacteristicValues = new EntitySet(new Action(this.attach_CharacteristicValues), new Action(this.detach_CharacteristicValues)); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public long Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.SendPropertyChanging(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] public string Name { get { return this._Name; } set { if ((this._Name != value)) { this.OnNameChanging(value); this.SendPropertyChanging(); this._Name = value; this.SendPropertyChanged("Name"); this.OnNameChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="TinyInt NOT NULL")] public byte Type { get { return this._Type; } set { if ((this._Type != value)) { this.OnTypeChanging(value); this.SendPropertyChanging(); this._Type = value; this.SendPropertyChanged("Type"); this.OnTypeChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Characteristic_CharacteristicValue", Storage="_CharacteristicValues", ThisKey="Id", OtherKey="CharacteristicId")] public EntitySet CharacteristicValues { get { return this._CharacteristicValues; } set { this._CharacteristicValues.Assign(value); } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } private void attach_CharacteristicValues(CharacteristicValue entity) { this.SendPropertyChanging(); entity.Characteristic = this; } private void detach_CharacteristicValues(CharacteristicValue entity) { this.SendPropertyChanging(); entity.Characteristic = null; } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.CharacteristicValue")] public partial class CharacteristicValue : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private long _Id; private long _ProblemId; private long _CharacteristicId; private long _DataTypeId; private System.Nullable _BoolValue; private System.Nullable _IntValue; private System.Nullable _LongValue; private System.Nullable _FloatValue; private System.Nullable _DoubleValue; private string _StringValue; private EntityRef _Characteristic; private EntityRef _DataType; private EntityRef _Problem; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(long value); partial void OnIdChanged(); partial void OnProblemIdChanging(long value); partial void OnProblemIdChanged(); partial void OnCharacteristicIdChanging(long value); partial void OnCharacteristicIdChanged(); partial void OnDataTypeIdChanging(long value); partial void OnDataTypeIdChanged(); partial void OnBoolValueChanging(System.Nullable value); partial void OnBoolValueChanged(); partial void OnIntValueChanging(System.Nullable value); partial void OnIntValueChanged(); partial void OnLongValueChanging(System.Nullable value); partial void OnLongValueChanged(); partial void OnFloatValueChanging(System.Nullable value); partial void OnFloatValueChanged(); partial void OnDoubleValueChanging(System.Nullable value); partial void OnDoubleValueChanged(); partial void OnStringValueChanging(string value); partial void OnStringValueChanged(); #endregion public CharacteristicValue() { this._Characteristic = default(EntityRef); this._DataType = default(EntityRef); this._Problem = default(EntityRef); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public long Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.SendPropertyChanging(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemId", DbType="BigInt NOT NULL")] public long ProblemId { get { return this._ProblemId; } set { if ((this._ProblemId != value)) { if (this._Problem.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnProblemIdChanging(value); this.SendPropertyChanging(); this._ProblemId = value; this.SendPropertyChanged("ProblemId"); this.OnProblemIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CharacteristicId", DbType="BigInt NOT NULL")] public long CharacteristicId { get { return this._CharacteristicId; } set { if ((this._CharacteristicId != value)) { if (this._Characteristic.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnCharacteristicIdChanging(value); this.SendPropertyChanging(); this._CharacteristicId = value; this.SendPropertyChanged("CharacteristicId"); this.OnCharacteristicIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataTypeId", DbType="BigInt NOT NULL")] public long DataTypeId { get { return this._DataTypeId; } set { if ((this._DataTypeId != value)) { if (this._DataType.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnDataTypeIdChanging(value); this.SendPropertyChanging(); this._DataTypeId = value; this.SendPropertyChanged("DataTypeId"); this.OnDataTypeIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BoolValue", DbType="Bit")] public System.Nullable BoolValue { get { return this._BoolValue; } set { if ((this._BoolValue != value)) { this.OnBoolValueChanging(value); this.SendPropertyChanging(); this._BoolValue = value; this.SendPropertyChanged("BoolValue"); this.OnBoolValueChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IntValue", DbType="Int")] public System.Nullable IntValue { get { return this._IntValue; } set { if ((this._IntValue != value)) { this.OnIntValueChanging(value); this.SendPropertyChanging(); this._IntValue = value; this.SendPropertyChanged("IntValue"); this.OnIntValueChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LongValue", DbType="BigInt")] public System.Nullable LongValue { get { return this._LongValue; } set { if ((this._LongValue != value)) { this.OnLongValueChanging(value); this.SendPropertyChanging(); this._LongValue = value; this.SendPropertyChanged("LongValue"); this.OnLongValueChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FloatValue", DbType="Real")] public System.Nullable FloatValue { get { return this._FloatValue; } set { if ((this._FloatValue != value)) { this.OnFloatValueChanging(value); this.SendPropertyChanging(); this._FloatValue = value; this.SendPropertyChanged("FloatValue"); this.OnFloatValueChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DoubleValue", DbType="Float")] public System.Nullable DoubleValue { get { return this._DoubleValue; } set { if ((this._DoubleValue != value)) { this.OnDoubleValueChanging(value); this.SendPropertyChanging(); this._DoubleValue = value; this.SendPropertyChanged("DoubleValue"); this.OnDoubleValueChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StringValue", DbType="NVarChar(MAX)")] public string StringValue { get { return this._StringValue; } set { if ((this._StringValue != value)) { this.OnStringValueChanging(value); this.SendPropertyChanging(); this._StringValue = value; this.SendPropertyChanged("StringValue"); this.OnStringValueChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Characteristic_CharacteristicValue", Storage="_Characteristic", ThisKey="CharacteristicId", OtherKey="Id", IsForeignKey=true)] public Characteristic Characteristic { get { return this._Characteristic.Entity; } set { Characteristic previousValue = this._Characteristic.Entity; if (((previousValue != value) || (this._Characteristic.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Characteristic.Entity = null; previousValue.CharacteristicValues.Remove(this); } this._Characteristic.Entity = value; if ((value != null)) { value.CharacteristicValues.Add(this); this._CharacteristicId = value.Id; } else { this._CharacteristicId = default(long); } this.SendPropertyChanged("Characteristic"); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DataType_CharacteristicValue", Storage="_DataType", ThisKey="DataTypeId", OtherKey="Id", IsForeignKey=true)] public DataType DataType { get { return this._DataType.Entity; } set { DataType previousValue = this._DataType.Entity; if (((previousValue != value) || (this._DataType.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._DataType.Entity = null; previousValue.CharacteristicValues.Remove(this); } this._DataType.Entity = value; if ((value != null)) { value.CharacteristicValues.Add(this); this._DataTypeId = value.Id; } else { this._DataTypeId = default(long); } this.SendPropertyChanged("DataType"); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Problem_CharacteristicValue", Storage="_Problem", ThisKey="ProblemId", OtherKey="Id", IsForeignKey=true)] public Problem Problem { get { return this._Problem.Entity; } set { Problem previousValue = this._Problem.Entity; if (((previousValue != value) || (this._Problem.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Problem.Entity = null; previousValue.CharacteristicValues.Remove(this); } this._Problem.Entity = value; if ((value != null)) { value.CharacteristicValues.Add(this); this._ProblemId = value.Id; } else { this._ProblemId = default(long); } this.SendPropertyChanged("Problem"); } } } public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; protected virtual void SendPropertyChanging() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, emptyChangingEventArgs); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } } } #pragma warning restore 1591