/App.Account/DataAccess/SqlServer/AccountRepository.designer.cs
C# | 597 lines | 518 code | 70 blank | 9 comment | 50 complexity | 20ef73863a5b60c38190024e60bd7003 MD5 | raw file
Possible License(s): MIT
- #pragma warning disable 1591
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- // Runtime Version:2.0.50727.3053
- //
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
-
- namespace App.Account.DataAccess.SqlServer
- {
- 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;
-
-
- [System.Data.Linq.Mapping.DatabaseAttribute(Name="Unifico")]
- public partial class AccountRepositoryDataContext : System.Data.Linq.DataContext
- {
-
- private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
-
- #region Extensibility Method Definitions
- partial void OnCreated();
- partial void InsertRole(App.Account.DataAccess.SqlServer.Models.Role instance);
- partial void UpdateRole(App.Account.DataAccess.SqlServer.Models.Role instance);
- partial void DeleteRole(App.Account.DataAccess.SqlServer.Models.Role instance);
- partial void InsertUser(App.Account.DataAccess.SqlServer.Models.User instance);
- partial void UpdateUser(App.Account.DataAccess.SqlServer.Models.User instance);
- partial void DeleteUser(App.Account.DataAccess.SqlServer.Models.User instance);
- partial void InsertUsersRole(App.Account.DataAccess.SqlServer.Models.UsersRole instance);
- partial void UpdateUsersRole(App.Account.DataAccess.SqlServer.Models.UsersRole instance);
- partial void DeleteUsersRole(App.Account.DataAccess.SqlServer.Models.UsersRole instance);
- #endregion
-
- public AccountRepositoryDataContext() :
- base(global::App.Account.Properties.Settings.Default.Connection, mappingSource)
- {
- OnCreated();
- }
-
- public AccountRepositoryDataContext(string connection) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public AccountRepositoryDataContext(System.Data.IDbConnection connection) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public AccountRepositoryDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public AccountRepositoryDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public System.Data.Linq.Table<App.Account.DataAccess.SqlServer.Models.Role> Roles
- {
- get
- {
- return this.GetTable<App.Account.DataAccess.SqlServer.Models.Role>();
- }
- }
-
- public System.Data.Linq.Table<App.Account.DataAccess.SqlServer.Models.User> Users
- {
- get
- {
- return this.GetTable<App.Account.DataAccess.SqlServer.Models.User>();
- }
- }
-
- public System.Data.Linq.Table<App.Account.DataAccess.SqlServer.Models.UsersRole> UsersRoles
- {
- get
- {
- return this.GetTable<App.Account.DataAccess.SqlServer.Models.UsersRole>();
- }
- }
- }
- }
- namespace App.Account.DataAccess.SqlServer.Models
- {
- using System.Data.Linq;
- using System.Data.Linq.Mapping;
- using System.ComponentModel;
- using System;
-
-
- [Table(Name="dbo.Role")]
- public partial class Role : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private System.Guid _RoleID;
-
- private string _Name;
-
- private int _Level;
-
- private EntitySet<UsersRole> _UsersRoles;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnRoleIDChanging(System.Guid value);
- partial void OnRoleIDChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- partial void OnLevelChanging(int value);
- partial void OnLevelChanged();
- #endregion
-
- public Role()
- {
- this._UsersRoles = new EntitySet<UsersRole>(new Action<UsersRole>(this.attach_UsersRoles), new Action<UsersRole>(this.detach_UsersRoles));
- OnCreated();
- }
-
- [Column(Storage="_RoleID", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
- public System.Guid RoleID
- {
- get
- {
- return this._RoleID;
- }
- set
- {
- if ((this._RoleID != value))
- {
- this.OnRoleIDChanging(value);
- this.SendPropertyChanging();
- this._RoleID = value;
- this.SendPropertyChanged("RoleID");
- this.OnRoleIDChanged();
- }
- }
- }
-
- [Column(Storage="_Name", DbType="NVarChar(50) 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();
- }
- }
- }
-
- [Column(Name="[Level]", Storage="_Level", DbType="Int NOT NULL")]
- public int Level
- {
- get
- {
- return this._Level;
- }
- set
- {
- if ((this._Level != value))
- {
- this.OnLevelChanging(value);
- this.SendPropertyChanging();
- this._Level = value;
- this.SendPropertyChanged("Level");
- this.OnLevelChanged();
- }
- }
- }
-
- [Association(Name="Role_UsersRole", Storage="_UsersRoles", ThisKey="RoleID", OtherKey="RoleID")]
- public EntitySet<UsersRole> UsersRoles
- {
- get
- {
- return this._UsersRoles;
- }
- set
- {
- this._UsersRoles.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_UsersRoles(UsersRole entity)
- {
- this.SendPropertyChanging();
- entity.Role = this;
- }
-
- private void detach_UsersRoles(UsersRole entity)
- {
- this.SendPropertyChanging();
- entity.Role = null;
- }
- }
-
- [Table(Name="dbo.[User]")]
- public partial class User : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private System.Guid _UserID;
-
- private string _Name;
-
- private string _Password;
-
- private string _Email;
-
- private EntitySet<UsersRole> _UsersRoles;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnUserIDChanging(System.Guid value);
- partial void OnUserIDChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- partial void OnPasswordChanging(string value);
- partial void OnPasswordChanged();
- partial void OnEmailChanging(string value);
- partial void OnEmailChanged();
- #endregion
-
- public User()
- {
- this._UsersRoles = new EntitySet<UsersRole>(new Action<UsersRole>(this.attach_UsersRoles), new Action<UsersRole>(this.detach_UsersRoles));
- OnCreated();
- }
-
- [Column(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();
- }
- }
- }
-
- [Column(Storage="_Name", DbType="NVarChar(50) 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();
- }
- }
- }
-
- [Column(Storage="_Password", DbType="NVarChar(255) 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();
- }
- }
- }
-
- [Column(Storage="_Email", DbType="NVarChar(255) 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();
- }
- }
- }
-
- [Association(Name="User_UsersRole", Storage="_UsersRoles", ThisKey="UserID", OtherKey="UserID")]
- public EntitySet<UsersRole> UsersRoles
- {
- get
- {
- return this._UsersRoles;
- }
- set
- {
- this._UsersRoles.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_UsersRoles(UsersRole entity)
- {
- this.SendPropertyChanging();
- entity.User = this;
- }
-
- private void detach_UsersRoles(UsersRole entity)
- {
- this.SendPropertyChanging();
- entity.User = null;
- }
- }
-
- [Table(Name="dbo.UsersRoles")]
- public partial class UsersRole : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private System.Guid _UsersRolesID;
-
- private System.Guid _UserID;
-
- private System.Guid _RoleID;
-
- private EntityRef<Role> _Role;
-
- private EntityRef<User> _User;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnUsersRolesIDChanging(System.Guid value);
- partial void OnUsersRolesIDChanged();
- partial void OnUserIDChanging(System.Guid value);
- partial void OnUserIDChanged();
- partial void OnRoleIDChanging(System.Guid value);
- partial void OnRoleIDChanged();
- #endregion
-
- public UsersRole()
- {
- this._Role = default(EntityRef<Role>);
- this._User = default(EntityRef<User>);
- OnCreated();
- }
-
- [Column(Storage="_UsersRolesID", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
- public System.Guid UsersRolesID
- {
- get
- {
- return this._UsersRolesID;
- }
- set
- {
- if ((this._UsersRolesID != value))
- {
- this.OnUsersRolesIDChanging(value);
- this.SendPropertyChanging();
- this._UsersRolesID = value;
- this.SendPropertyChanged("UsersRolesID");
- this.OnUsersRolesIDChanged();
- }
- }
- }
-
- [Column(Storage="_UserID", DbType="UniqueIdentifier NOT NULL")]
- public System.Guid UserID
- {
- get
- {
- return this._UserID;
- }
- set
- {
- if ((this._UserID != value))
- {
- if (this._User.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnUserIDChanging(value);
- this.SendPropertyChanging();
- this._UserID = value;
- this.SendPropertyChanged("UserID");
- this.OnUserIDChanged();
- }
- }
- }
-
- [Column(Storage="_RoleID", DbType="UniqueIdentifier NOT NULL")]
- public System.Guid 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();
- }
- }
- }
-
- [Association(Name="Role_UsersRole", 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.UsersRoles.Remove(this);
- }
- this._Role.Entity = value;
- if ((value != null))
- {
- value.UsersRoles.Add(this);
- this._RoleID = value.RoleID;
- }
- else
- {
- this._RoleID = default(System.Guid);
- }
- this.SendPropertyChanged("Role");
- }
- }
- }
-
- [Association(Name="User_UsersRole", Storage="_User", ThisKey="UserID", OtherKey="UserID", IsForeignKey=true)]
- public User User
- {
- get
- {
- return this._User.Entity;
- }
- set
- {
- User previousValue = this._User.Entity;
- if (((previousValue != value)
- || (this._User.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._User.Entity = null;
- previousValue.UsersRoles.Remove(this);
- }
- this._User.Entity = value;
- if ((value != null))
- {
- value.UsersRoles.Add(this);
- this._UserID = value.UserID;
- }
- else
- {
- this._UserID = default(System.Guid);
- }
- this.SendPropertyChanged("User");
- }
- }
- }
-
- 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