[英]FetchXML in .NET Core - CRM Web API
I'm learning how to use CRM Web API with .NET Core to work with entities and I found this very useful library .我正在学习如何使用 CRM Web API 和 .NET Core 来处理实体,我发现这个非常有用的库。 There is an option to retrieve record data using
FetchXML
.有一个使用
FetchXML
检索记录数据的选项。
string fetchXml = "<fetch mapping='logical'><entity name='account'><attribute name='accountid'/><attribute name='name'/></entity></fetch>";
var fetchResults = await api.GetList("accounts", QueryOptions: new CRMGetListOptions() { FetchXml = fetchXml });
Is there any option how to compose more easily and elegantly the fetchXML
, for example by using QueryExpression ( Microsoft.CrmSdk.CoreAssemblies
) or something similar?是否有任何选项可以更轻松、更优雅地
fetchXML
,例如使用 QueryExpression ( Microsoft.CrmSdk.CoreAssemblies
)或类似的东西?
You can use QueryExpressionToFetchXmlRequest
to convert the QueryExpression into FetchXml.您可以使用
QueryExpressionToFetchXmlRequest
将 QueryExpression 转换为 FetchXml。
I have found Mike Ochs's FetchXmlWrapper helpful in certain projects.我发现 Mike Ochs 的FetchXmlWrapper在某些项目中很有帮助。
More info: https://www.cobalt.net/2014/06/25/performance-improvements-using-fetch-xml-wrapper/更多信息: https://www.cobalt.net/2014/06/25/performance-improvements-using-fetch-xml-wrapper/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.