我试图通过EntityReference筛选数据,但没有运气。如果没有where子句运行良好与where子句我得到以下错误:Dynamics CRM 2011筛选从Web服务返回的数据
The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.
这里是我的方法调用CRMService:
/// <summary>
/// Gets the categories.
/// </summary>
/// <returns></returns>
public IEnumerable<category> GetCategoriesExcludingSomething()
{
IEnumerable<category> data = CrmClient.categorySet.OrderBy(x => x.SubCategory).ThenBy(x => x.itf_name);
return data.Where(x => x.SubCategory.ToString() == "SomethingToExclude");
}
我一直在使用SubCategory.Name也尝试过,但它给出相同的错误。我认为这与它使用早期绑定的事实有关,但是在调试时我无法获得任何有用的信息。
任何建议或帮助将是巨大的,这应该是很容易:/