#pragma warning disable 1591 //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.21006.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace StockholmLibrary.Data { 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="stockholm_db")] public partial class StockholmDbDataContext : System.Data.Linq.DataContext { private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); #region Extensibility Method Definitions partial void OnCreated(); partial void InsertBadge(Badge instance); partial void UpdateBadge(Badge instance); partial void DeleteBadge(Badge instance); partial void InsertUser(User instance); partial void UpdateUser(User instance); partial void DeleteUser(User instance); partial void InsertRoleAccess(RoleAccess instance); partial void UpdateRoleAccess(RoleAccess instance); partial void DeleteRoleAccess(RoleAccess instance); partial void InsertRole(Role instance); partial void UpdateRole(Role instance); partial void DeleteRole(Role instance); partial void InsertSetting(Setting instance); partial void UpdateSetting(Setting instance); partial void DeleteSetting(Setting instance); #endregion public StockholmDbDataContext() : base(global::StockholmLibrary.Properties.Settings.Default.stockholm_dbConnectionString, mappingSource) { OnCreated(); } public StockholmDbDataContext(string connection) : base(connection, mappingSource) { OnCreated(); } public StockholmDbDataContext(System.Data.IDbConnection connection) : base(connection, mappingSource) { OnCreated(); } public StockholmDbDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : base(connection, mappingSource) { OnCreated(); } public StockholmDbDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : base(connection, mappingSource) { OnCreated(); } public System.Data.Linq.Table Badges { get { return this.GetTable(); } } public System.Data.Linq.Table Users { get { return this.GetTable(); } } public System.Data.Linq.Table RoleAccesses { get { return this.GetTable(); } } public System.Data.Linq.Table Roles { get { return this.GetTable(); } } public System.Data.Linq.Table Settings { get { return this.GetTable(); } } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Badges")] public partial class Badge : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private int _BadgeID; private string _BadgeName; private int _RoleID; private EntityRef _Role; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnBadgeIDChanging(int value); partial void OnBadgeIDChanged(); partial void OnBadgeNameChanging(string value); partial void OnBadgeNameChanged(); partial void OnRoleIDChanging(int value); partial void OnRoleIDChanged(); #endregion public Badge() { this._Role = default(EntityRef); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BadgeID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public int BadgeID { get { return this._BadgeID; } set { if ((this._BadgeID != value)) { this.OnBadgeIDChanging(value); this.SendPropertyChanging(); this._BadgeID = value; this.SendPropertyChanged("BadgeID"); this.OnBadgeIDChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BadgeName", DbType="VarChar(10) NOT NULL", CanBeNull=false)] public string BadgeName { get { return this._BadgeName; } set { if ((this._BadgeName != value)) { this.OnBadgeNameChanging(value); this.SendPropertyChanging(); this._BadgeName = value; this.SendPropertyChanged("BadgeName"); this.OnBadgeNameChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleID", DbType="Int NOT NULL")] public int RoleID { get { return this._RoleID; } set { if ((this._RoleID != value)) { if (this._Role.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnRoleIDChanging(value); this.SendPropertyChanging(); this._RoleID = value; this.SendPropertyChanged("RoleID"); this.OnRoleIDChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_Badge", Storage="_Role", ThisKey="RoleID", OtherKey="RoleID", IsForeignKey=true)] public Role Role { get { return this._Role.Entity; } set { Role previousValue = this._Role.Entity; if (((previousValue != value) || (this._Role.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Role.Entity = null; previousValue.Badges.Remove(this); } this._Role.Entity = value; if ((value != null)) { value.Badges.Add(this); this._RoleID = value.RoleID; } else { this._RoleID = default(int); } this.SendPropertyChanged("Role"); } } } 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.Users")] public partial class User : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private int _UserID; private string _Username; private string _Password; private int _RoleID; private string _Sex; private string _Figure; private string _Motto; private string _Email; private string _Dob; private int _Credits; private int _Tickets; private int _Film; private string _PoolFigure; private int _ClubDaysRemaining; private int _ClubMonthsRemaining; private int _ClubMonthsElapsed; private string _CurrentBadge; private System.DateTime _LastLogin; private EntityRef _Role; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnUserIDChanging(int value); partial void OnUserIDChanged(); partial void OnUsernameChanging(string value); partial void OnUsernameChanged(); partial void OnPasswordChanging(string value); partial void OnPasswordChanged(); partial void OnRoleIDChanging(int value); partial void OnRoleIDChanged(); partial void OnSexChanging(string value); partial void OnSexChanged(); partial void OnFigureChanging(string value); partial void OnFigureChanged(); partial void OnMottoChanging(string value); partial void OnMottoChanged(); partial void OnEmailChanging(string value); partial void OnEmailChanged(); partial void OnDobChanging(string value); partial void OnDobChanged(); partial void OnCreditsChanging(int value); partial void OnCreditsChanged(); partial void OnTicketsChanging(int value); partial void OnTicketsChanged(); partial void OnFilmChanging(int value); partial void OnFilmChanged(); partial void OnPoolFigureChanging(string value); partial void OnPoolFigureChanged(); partial void OnClubDaysRemainingChanging(int value); partial void OnClubDaysRemainingChanged(); partial void OnClubMonthsRemainingChanging(int value); partial void OnClubMonthsRemainingChanged(); partial void OnClubMonthsElapsedChanging(int value); partial void OnClubMonthsElapsedChanged(); partial void OnCurrentBadgeChanging(string value); partial void OnCurrentBadgeChanged(); partial void OnLastLoginChanging(System.DateTime value); partial void OnLastLoginChanged(); #endregion public User() { this._Role = default(EntityRef); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public int 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="_Username", DbType="VarChar(50) NOT NULL", CanBeNull=false)] public string Username { get { return this._Username; } set { if ((this._Username != value)) { this.OnUsernameChanging(value); this.SendPropertyChanging(); this._Username = value; this.SendPropertyChanged("Username"); this.OnUsernameChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Password", DbType="VarChar(50) NOT NULL", CanBeNull=false)] public string Password { get { return this._Password; } set { if ((this._Password != value)) { this.OnPasswordChanging(value); this.SendPropertyChanging(); this._Password = value; this.SendPropertyChanged("Password"); this.OnPasswordChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleID", DbType="Int NOT NULL")] public int RoleID { get { return this._RoleID; } set { if ((this._RoleID != value)) { if (this._Role.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnRoleIDChanging(value); this.SendPropertyChanging(); this._RoleID = value; this.SendPropertyChanged("RoleID"); this.OnRoleIDChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sex", DbType="VarChar(1) NOT NULL", CanBeNull=false)] public string Sex { get { return this._Sex; } set { if ((this._Sex != value)) { this.OnSexChanging(value); this.SendPropertyChanging(); this._Sex = value; this.SendPropertyChanged("Sex"); this.OnSexChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Figure", DbType="VarChar(500) NOT NULL", CanBeNull=false)] public string Figure { get { return this._Figure; } set { if ((this._Figure != value)) { this.OnFigureChanging(value); this.SendPropertyChanging(); this._Figure = value; this.SendPropertyChanged("Figure"); this.OnFigureChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Motto", DbType="VarChar(500) NOT NULL", CanBeNull=false)] public string Motto { get { return this._Motto; } set { if ((this._Motto != value)) { this.OnMottoChanging(value); this.SendPropertyChanging(); this._Motto = value; this.SendPropertyChanged("Motto"); this.OnMottoChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Email", DbType="VarChar(500) NOT NULL", CanBeNull=false)] public string Email { get { return this._Email; } set { if ((this._Email != value)) { this.OnEmailChanging(value); this.SendPropertyChanging(); this._Email = value; this.SendPropertyChanged("Email"); this.OnEmailChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Dob", DbType="VarChar(500) NOT NULL", CanBeNull=false)] public string Dob { get { return this._Dob; } set { if ((this._Dob != value)) { this.OnDobChanging(value); this.SendPropertyChanging(); this._Dob = value; this.SendPropertyChanged("Dob"); this.OnDobChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Credits", DbType="Int NOT NULL")] public int Credits { get { return this._Credits; } set { if ((this._Credits != value)) { this.OnCreditsChanging(value); this.SendPropertyChanging(); this._Credits = value; this.SendPropertyChanged("Credits"); this.OnCreditsChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Tickets", DbType="Int NOT NULL")] public int Tickets { get { return this._Tickets; } set { if ((this._Tickets != value)) { this.OnTicketsChanging(value); this.SendPropertyChanging(); this._Tickets = value; this.SendPropertyChanged("Tickets"); this.OnTicketsChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Film", DbType="Int NOT NULL")] public int Film { get { return this._Film; } set { if ((this._Film != value)) { this.OnFilmChanging(value); this.SendPropertyChanging(); this._Film = value; this.SendPropertyChanged("Film"); this.OnFilmChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PoolFigure", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] public string PoolFigure { get { return this._PoolFigure; } set { if ((this._PoolFigure != value)) { this.OnPoolFigureChanging(value); this.SendPropertyChanging(); this._PoolFigure = value; this.SendPropertyChanged("PoolFigure"); this.OnPoolFigureChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClubDaysRemaining", DbType="Int NOT NULL")] public int ClubDaysRemaining { get { return this._ClubDaysRemaining; } set { if ((this._ClubDaysRemaining != value)) { this.OnClubDaysRemainingChanging(value); this.SendPropertyChanging(); this._ClubDaysRemaining = value; this.SendPropertyChanged("ClubDaysRemaining"); this.OnClubDaysRemainingChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClubMonthsRemaining", DbType="Int NOT NULL")] public int ClubMonthsRemaining { get { return this._ClubMonthsRemaining; } set { if ((this._ClubMonthsRemaining != value)) { this.OnClubMonthsRemainingChanging(value); this.SendPropertyChanging(); this._ClubMonthsRemaining = value; this.SendPropertyChanged("ClubMonthsRemaining"); this.OnClubMonthsRemainingChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClubMonthsElapsed", DbType="Int NOT NULL")] public int ClubMonthsElapsed { get { return this._ClubMonthsElapsed; } set { if ((this._ClubMonthsElapsed != value)) { this.OnClubMonthsElapsedChanging(value); this.SendPropertyChanging(); this._ClubMonthsElapsed = value; this.SendPropertyChanged("ClubMonthsElapsed"); this.OnClubMonthsElapsedChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CurrentBadge", DbType="VarChar(10)")] public string CurrentBadge { get { return this._CurrentBadge; } set { if ((this._CurrentBadge != value)) { this.OnCurrentBadgeChanging(value); this.SendPropertyChanging(); this._CurrentBadge = value; this.SendPropertyChanged("CurrentBadge"); this.OnCurrentBadgeChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastLogin", DbType="DateTime NOT NULL")] public System.DateTime LastLogin { get { return this._LastLogin; } set { if ((this._LastLogin != value)) { this.OnLastLoginChanging(value); this.SendPropertyChanging(); this._LastLogin = value; this.SendPropertyChanged("LastLogin"); this.OnLastLoginChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_User", Storage="_Role", ThisKey="RoleID", OtherKey="RoleID", IsForeignKey=true)] public Role Role { get { return this._Role.Entity; } set { Role previousValue = this._Role.Entity; if (((previousValue != value) || (this._Role.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Role.Entity = null; previousValue.Users.Remove(this); } this._Role.Entity = value; if ((value != null)) { value.Users.Add(this); this._RoleID = value.RoleID; } else { this._RoleID = default(int); } this.SendPropertyChanged("Role"); } } } 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.RoleAccess")] public partial class RoleAccess : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private int _RoleAccessID; private int _RoleID; private string _AccessName; private EntityRef _Role; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnRoleAccessIDChanging(int value); partial void OnRoleAccessIDChanged(); partial void OnRoleIDChanging(int value); partial void OnRoleIDChanged(); partial void OnAccessNameChanging(string value); partial void OnAccessNameChanged(); #endregion public RoleAccess() { this._Role = default(EntityRef); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleAccessID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public int RoleAccessID { get { return this._RoleAccessID; } set { if ((this._RoleAccessID != value)) { this.OnRoleAccessIDChanging(value); this.SendPropertyChanging(); this._RoleAccessID = value; this.SendPropertyChanged("RoleAccessID"); this.OnRoleAccessIDChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleID", DbType="Int NOT NULL")] public int RoleID { get { return this._RoleID; } set { if ((this._RoleID != value)) { if (this._Role.HasLoadedOrAssignedValue) { throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } this.OnRoleIDChanging(value); this.SendPropertyChanging(); this._RoleID = value; this.SendPropertyChanged("RoleID"); this.OnRoleIDChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccessName", DbType="VarChar(50) NOT NULL", CanBeNull=false)] public string AccessName { get { return this._AccessName; } set { if ((this._AccessName != value)) { this.OnAccessNameChanging(value); this.SendPropertyChanging(); this._AccessName = value; this.SendPropertyChanged("AccessName"); this.OnAccessNameChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_RoleAccess", Storage="_Role", ThisKey="RoleID", OtherKey="RoleID", IsForeignKey=true)] public Role Role { get { return this._Role.Entity; } set { Role previousValue = this._Role.Entity; if (((previousValue != value) || (this._Role.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Role.Entity = null; previousValue.RoleAccesses.Remove(this); } this._Role.Entity = value; if ((value != null)) { value.RoleAccesses.Add(this); this._RoleID = value.RoleID; } else { this._RoleID = default(int); } this.SendPropertyChanged("Role"); } } } 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.Roles")] public partial class Role : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private int _RoleID; private string _RoleName; private System.Nullable _InheritedRole; private EntitySet _Badges; private EntitySet _Users; private EntitySet _RoleAccesses; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnRoleIDChanging(int value); partial void OnRoleIDChanged(); partial void OnRoleNameChanging(string value); partial void OnRoleNameChanged(); partial void OnInheritedRoleChanging(System.Nullable value); partial void OnInheritedRoleChanged(); #endregion public Role() { this._Badges = new EntitySet(new Action(this.attach_Badges), new Action(this.detach_Badges)); this._Users = new EntitySet(new Action(this.attach_Users), new Action(this.detach_Users)); this._RoleAccesses = new EntitySet(new Action(this.attach_RoleAccesses), new Action(this.detach_RoleAccesses)); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public int RoleID { get { return this._RoleID; } set { if ((this._RoleID != value)) { this.OnRoleIDChanging(value); this.SendPropertyChanging(); this._RoleID = value; this.SendPropertyChanged("RoleID"); this.OnRoleIDChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleName", DbType="VarChar(50) NOT NULL", CanBeNull=false)] public string RoleName { get { return this._RoleName; } set { if ((this._RoleName != value)) { this.OnRoleNameChanging(value); this.SendPropertyChanging(); this._RoleName = value; this.SendPropertyChanged("RoleName"); this.OnRoleNameChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InheritedRole", DbType="Int")] public System.Nullable InheritedRole { get { return this._InheritedRole; } set { if ((this._InheritedRole != value)) { this.OnInheritedRoleChanging(value); this.SendPropertyChanging(); this._InheritedRole = value; this.SendPropertyChanged("InheritedRole"); this.OnInheritedRoleChanged(); } } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_Badge", Storage="_Badges", ThisKey="RoleID", OtherKey="RoleID")] public EntitySet Badges { get { return this._Badges; } set { this._Badges.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_User", Storage="_Users", ThisKey="RoleID", OtherKey="RoleID")] public EntitySet Users { get { return this._Users; } set { this._Users.Assign(value); } } [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_RoleAccess", Storage="_RoleAccesses", ThisKey="RoleID", OtherKey="RoleID")] public EntitySet RoleAccesses { get { return this._RoleAccesses; } set { this._RoleAccesses.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_Badges(Badge entity) { this.SendPropertyChanging(); entity.Role = this; } private void detach_Badges(Badge entity) { this.SendPropertyChanging(); entity.Role = null; } private void attach_Users(User entity) { this.SendPropertyChanging(); entity.Role = this; } private void detach_Users(User entity) { this.SendPropertyChanging(); entity.Role = null; } private void attach_RoleAccesses(RoleAccess entity) { this.SendPropertyChanging(); entity.Role = this; } private void detach_RoleAccesses(RoleAccess entity) { this.SendPropertyChanging(); entity.Role = null; } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Settings")] public partial class Setting : INotifyPropertyChanging, INotifyPropertyChanged { private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); private int _SettingsVersion; private int _DatabaseVersion; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnSettingsVersionChanging(int value); partial void OnSettingsVersionChanged(); partial void OnDatabaseVersionChanging(int value); partial void OnDatabaseVersionChanged(); #endregion public Setting() { OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SettingsVersion", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public int SettingsVersion { get { return this._SettingsVersion; } set { if ((this._SettingsVersion != value)) { this.OnSettingsVersionChanging(value); this.SendPropertyChanging(); this._SettingsVersion = value; this.SendPropertyChanged("SettingsVersion"); this.OnSettingsVersionChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DatabaseVersion", DbType="Int NOT NULL")] public int DatabaseVersion { get { return this._DatabaseVersion; } set { if ((this._DatabaseVersion != value)) { this.OnDatabaseVersionChanging(value); this.SendPropertyChanging(); this._DatabaseVersion = value; this.SendPropertyChanged("DatabaseVersion"); this.OnDatabaseVersionChanged(); } } } 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