update table with information from IDirectory
Posted
by
sue
on Stack Overflow
See other posts from Stack Overflow
or by sue
Published on 2012-04-03T11:25:13Z
Indexed on
2012/04/03
11:30 UTC
Read the original article
Hit count: 242
LINQ
|entity-framework-4
I have a table with 4 columns, LoginID, LastName, FirstName, Email. The data for LoginID was populated from an other table. I have to write a small routine to update this table, by sending in the LoginID and with help of IDirectory routines, get the Lastname, firstname and email. This is what i'm attempting to do, but getting confused with the right syntax.
using (TSADRequestEntities context = UnityHelper.Resolve()) {
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?
}
}
© Stack Overflow or respective owner