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