I'm learning how to use CRM Web API with .NET Core to work with entities and I found this very useful library. There is an option to retrieve record data using 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?