In my last question, i successfully to dump the data into combo box with solution from Leo but now, i want to get everything of specific user and store into generic list. i tried with this code but it's not working. May i know is there something wrong with my code ?
var contexti = new OrganizationContext();
//contexti.Load(contexti.GetAdminPassQuery(userName), LoadInfo, null);
EntityQuery query = contexti.GetAdminPassQuery(userName);
contexti.Load<tblAdmin>(query).Completed += (sender, args) =>
{
List<AdminInfo> list = ((LoadOperation<tblAdmin>) sender).Entities.
ToList();}
this is in the domain context.
public IQueryable<tblAdmin> GetAdminPass(string adminId)
{
return this.ObjectContext.tblAdmins.Where(e => e.adminID.Equals(adminId));
}
this is the generic list store in helper folder
public class AdminInfo
{
public string AdminId { get; set; }
public string AFirstName { get; set; }
public string ALastName { get; set; }
public string AEmail { get; set; }
public string APassword { get; set; }
}
Thank you for reply