Example of query on server side.
//Create Condition.. can be many conditions + type of operator
ConditionExpression[] conditions = new ConditionExpression[1];
ConditionExpression condition = new ConditionExpression();
condition.AttributeName = fullname;
condition.Operator = ConditionOperator.Equal;
condition.Values = new object[] { "Rami Heleg" };
conditions[i] = condition;
FilterExpression filter = new FilterExpression();
filter.FilterOperator = LogicalOperator.And;
filter.Conditions = conditions;
QueryExpression query = new QueryExpression();
//Entity name
query.EntityName = "contact";
//allow to define specific columns
query.ColumnSet = new AllColumns();
query.Criteria = filter;
RetrieveMultipleRequest request = new RetrieveMultipleRequest();
request.ReturnDynamicEntities = false;
request.Query= query ;
//run Query
RetrieveMultipleResponse response = (RetrieveMultipleResponse)pService.Execute(service, request);
//Result
response.BusinessEntityCollection.BusinessEntities;
Thanks,
Rami Heleg