0
我有一個包含4列的表,即LoginID,LastName,FirstName,Email。 LoginID的數據從其他表填充。我必須編寫一個小例程來更新此表,方法是發送LoginID並在IDirectory例程的幫助下獲取姓氏,名字和電子郵件。這是我正在嘗試做的事情,但是對正確的語法感到困惑。更新表與來自IDirectory的信息
using (TSADRequestEntities context = UnityHelper.Resolve<TSADRequestEntities>())
{
var fpvalues = context.FOCALPOINTs.ToList();
foreach (var item in fpvalues)
{
IEnumerable<UserInfo> query = UnityHelper.Resolve<IUserDirectory>().Search(item.LoginID);
//Here, FocalPoint is the table that has the loginID and the other fields
//I need to update. the query shld now hv info on lastname etc..how do I
//retrieve that value and update the table?
}
}
我在FirstOrDefault上失蹤,想知道如何獲得單獨一個記錄.Thx。 – sansid 2012-04-04 08:28:13