我是EF中的新成員。當我們使用數據讀取器或數據集時,我們有時會在循環中填充控件的值。像通過循環的實體框架數據綁定
datareader dr=getdata()
while(dr.read())
{
// in this loop we can populate control with value from datareader
}
dataset ds =getdata()
for(int i=0;i<=ds.tables[0].rows.count-1;i++)
{
// in this loop we can populate control with value from dataset
}
,所以我只是想知道,當我與EF工作,我又如何能在迭代循環和填充控制與價值。
另一個問題是如何在EF中刪除null。
請幫我用示例代碼來理解事物。感謝