CRM 2011 OrganizationServiceProxy vs OrganizationServiceContext

John Livermore picture John Livermore · May 5, 2011 · Viewed 12.5k times · Source

I am reading through the MS CRM 2011 SDK docs and see two ways for accessing entities: OrganizationServiceContext or OrganizationServiceProxy.

Why would I choose one method over another? The SDK isn't really clear on design considerations on this point.

Answer

ccellar picture ccellar · May 9, 2011

IOrganizationService is your connection to the CRM system.

In Microsoft Dynamics CRM 2011, the primary Web service accessing data and metadata for your organization is the IOrganizationService Web service.

The class OrganizationServiceContext is used as the base class for the data context which is created when you are using early bound entity classes. See how to Use the Organization Service Context Class. It uses an IOrganizationService as the underlying connection.