[Table(Name="dbo.d_TestTable")]
[DataContract()]
[Serializable()]
public partial class TestClass : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _ID;
private string _Name;
public TestClass()
{
this.Initialize();
}
[Column(Storage="_ID", DbType="Int NOT NULL", IsPrimaryKey=true)]
[DataMember(Order=1)]
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();
}
}
}
[Column(Storage="_Name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
[DataMember(Order=2)]
public string Name
{
get
{
return this._Name;
}
set
{
if ((this._Name != value))
{
this.OnItemNameChanging(value);
this.SendPropertyChanging();
this._Name = value;
this.SendPropertyChanged("Name");
this.OnItemNameChanged();
}
}
}
[field: NonSerialized]
public event PropertyChangingEventHandler PropertyChanging;
[field: NonSerialized]
public event PropertyChangedEventHandler PropertyChanged;
public virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
public virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void Initialize()
{
OnCreated();
}
[OnDeserializing()]
[System.ComponentModel.EditorBrowsableAttribute(EditorBrowsableState.Never)]
public void OnDeserializing(StreamingContext context)
{
this.Initialize();
}
}