Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [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 _Id;
- private string _Name;
- private string _Password;
- private string _Email;
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnIdChanging(int value);
- partial void OnIdChanged();
- 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()
- {
- OnCreated();
- }
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int 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="VarChar(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();
- }
- }
- }
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Password", DbType="Char(40)")]
- 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="_Email", DbType="VarChar(256)")]
- 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();
- }
- }
- }
- 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));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement