public static SystemUser GetSystemUser(IOrganizationService ser, string domainname, ColumnSet columnset)
{
try
{
QueryExpression query = GetQueryExpressionSingle("systemuser", "domainname", domainname, columnset);
EntityCollection ec = ser.RetrieveMultiple(query);
if (ec != null && ec.Entities.Count == 1)
return (SystemUser)ec.Entities[0];
else
return new SystemUser();
}
catch (Exception ex)
{
throw ex;
}
}
GetQueryExpressionSingle metodu
Hiç yorum yok:
Yorum Gönder