Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var crmClient = new CrmServiceClient(ConfigurationManager.ConnectionStrings["D365"].ConnectionString);
if (crmClient.IsReady)
{
using (var ctx = new OrganizationServiceContext(crmClient))
{
var result = ctx.CreateQuery<Contact>()
.Where(a => a.FirstName == "Jan")
.Select(a => new Contact
{
Id = a.Id,
FirstName = a.FirstName
})
.ToList();
Console.WriteLine(result.Count);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.