I'm migrating code from SDK for Dynamics CRM 2015 to the latest version which is for 2016 and 365. However, I have noticed that the generated XrmServiceContext is inheriting from Microsoft.Xrm.Sdk.Client.OrganizationServiceContext
instead of Microsoft.Xrm.Client.CrmOrganizationServiceContext
. That removed the automatic lazy loading of related entities on CrmOrganizationServiceContext
. I wasted hours trying to find out why the related entities were empty while the code compiles correctly. I have found that the Microsoft.Xrm.Client
has been removed from the 8.x SDK. Does anyone know if the CrmOrganizationServiceContext
have been moved/renamed to something else or it was simply removed? Is there alternatives for that lazy loading support? Don't want to find all the places related entities are directly used and add a LoadProperty
to it. Thanks.
Where is CrmOrganizationServiceContext for CRM 2016 (8.x) SDK?
Asked Answered
© 2022 - 2024 — McMap. All rights reserved.
Entity
andServiceContext
wrappers to add back this lazy loading feature. I created this github repo: github.com/ZapTechnology/XrmLazyLoading. It is much lighter weighted than the originalCrmOrganizationServiceContext
and only depends onMicrosoft.CrmSdk.CoreAssemblies
– Gurgitation