namespace ConvertEntity
{
public class ConatactAccess: PortalClass
{
public IEnumerable<Entity> CurrentUsercontact
{
get
{
var emptyResult = new List<Entity>();
return GetLoginContact(ServiceContext, "Admin");
}
}
public IEnumerable<Entity> GetLoginContact(OrganizationServiceContext context, string username)
{
var result = new List<Entity>();
var findContact =
from c in context.CreateQuery("contact")
where c.GetAttributeValue<string>("linu_username") == username
select c;
result.AddRange(findContact);
return result;
}
public Contact retunruser()
{
var contactresult = new ConatactAccess().CurrentUsercontact.Cast<Contact>();
Contact contactre = null;
foreach (Contact item in contactresult)
{
contactre = item;
}
return contactre ;
}
}
}
No comments:
Post a Comment