Use the Late Bound Entity Class in Code
In Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online, you can use the Entity class when you work with entities. In Microsoft Dynamics CRM 4.0, you used the DynamicEntity class. When initialized, the Entity class contains the logical name of an entity and a property-bag array of the entity’s attributes. This lets you use late binding so that you can work with types such as custom entities and custom attributes that were not available when your application was compiled. Because the entity base class always contains the property bag of attributes and values, the ReturnDynamicsEntities property from Microsoft Dynamics CRM 4.0 is no longer necessary.
The key difference between early and late binding involves type conversion. While early binding provides compile-time checking of all types so that no implicit casts occur, late binding checks types only when the object is created or an action is performed on the type. The Entity class requires types to be explicitly specified to prevent implicit casts.
ConceptsUse the Entity Class for Create, Update and Delete
Use the Entity Class to Add or Update Associations Between Related Records
Other ResourcesWrite Applications and Server Extensions
Sample: Create, Retrieve, Update and Delete (Late Bound)
Sample: Serialize and Deserialize an Entity Instance
Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2012 Microsoft Corporation. All rights reserved.