Fec*_*ore 5 c# linq interface linq-to-sql
我在LINQ-to-SQL类中修改了我的数据源(通过旧的删除并在方法中向后拖动),并且惊讶地看到生成的类(MyDb.designer.cs)中不再实现INotifyPropertyChanging和INotifyPropertyChanged接口.
各个领域的方法看起来像这样......
[Column(Storage="_Size", DbType="NVarChar(100)")]
public string Size
{
get
{
return this._Size;
}
set
{
if ((this._Size != value))
{
this.OnSizeChanging(value);
this.SendPropertyChanging();
this._Size = value;
this.SendPropertyChanged("Size");
this.OnSizeChanged();
}
}
}
Run Code Online (Sandbox Code Playgroud)
看起来像这样......
[Column(Storage="_Size", DbType="NVarChar(100)")]
public string Size
{
get
{
return this._Size;
}
set
{
if ((this._Size != value))
{
this._Size = value;
}
}
}
Run Code Online (Sandbox Code Playgroud)
有关为什么会发生这种情况以及它将如何影响我的应用程序的任
| 归档时间: |
|
| 查看次数: |
1562 次 |
| 最近记录: |