Entity Entity Entity Entity Class

Definition

Represents an instance of an entity (a record).

public ref class Entity : System::Runtime::Serialization::IExtensibleDataObject
[System.Runtime.Serialization.DataContract(Name="Entity", Namespace="http://schemas.microsoft.com/xrm/2011/Contracts")]
public class Entity : System.Runtime.Serialization.IExtensibleDataObject
type Entity = class
    interface IExtensibleDataObject
Public Class Entity
Implements IExtensibleDataObject
Inheritance
EntityEntityEntityEntity
Attributes
Implements

Remarks

Entity is the base class for all types of entities in Microsoft Dynamics 365. You use this class for both early and late bound programming.

Constructors

Entity() Entity() Entity() Entity()

Initializes a new instance of the Entity class.

Entity(String) Entity(String) Entity(String) Entity(String)

Initializes a new instance of the Entity class setting the entity name.

Entity(String, KeyAttributeCollection) Entity(String, KeyAttributeCollection) Entity(String, KeyAttributeCollection) Entity(String, KeyAttributeCollection)

Initializes a new instance of the Entity class.

This was introduced with Microsoft Dynamics CRM Online 2015 Update 1 and cannot be used with earlier versions.

Entity(String, Guid) Entity(String, Guid) Entity(String, Guid) Entity(String, Guid)

Initializes a new instance of the Entity class.

This was introduced with Microsoft Dynamics CRM Online 2015 Update 1 and cannot be used with earlier versions.

Entity(String, String, Object) Entity(String, String, Object) Entity(String, String, Object) Entity(String, String, Object)

Initializes a new instance of the Entity class.

This was introduced with Microsoft Dynamics CRM Online 2015 Update 1 and cannot be used with earlier versions.

Properties

Attributes Attributes Attributes Attributes

Gets or sets the collection of attributes for the entity.

EntityState EntityState EntityState EntityState

Gets or sets the state of the entity.

ExtensionData ExtensionData ExtensionData ExtensionData

Gets or sets the structure that contains extra data.

FormattedValues FormattedValues FormattedValues FormattedValues

Gets of sets the collection of formatted values for the entity attributes.

Id Id Id Id

Gets or sets the ID of the record represented by this entity instance.

Item[String] Item[String] Item[String] Item[String]

Provides an indexer for the attribute values.

KeyAttributes KeyAttributes KeyAttributes KeyAttributes

Gets or sets the key attributes.

LogicalName LogicalName LogicalName LogicalName

Gets or sets the logical name of the entity.

RelatedEntities RelatedEntities RelatedEntities RelatedEntities

Gets or sets a collection of entity references (references to records).

RowVersion RowVersion RowVersion RowVersion

Gets or sets the row version

Methods

Contains(String) Contains(String) Contains(String) Contains(String)

Checks to see if there is a value present for the specified attribute.

GetAttributeValue<T>(String) GetAttributeValue<T>(String) GetAttributeValue<T>(String) GetAttributeValue<T>(String)

Gets the value of the attribute.

GetFormattedAttributeValue(String) GetFormattedAttributeValue(String) GetFormattedAttributeValue(String) GetFormattedAttributeValue(String)

Gets the formatted value of the attribute.

GetRelatedEntities<TEntity>(String, Nullable<EntityRole>) GetRelatedEntities<TEntity>(String, Nullable<EntityRole>) GetRelatedEntities<TEntity>(String, Nullable<EntityRole>) GetRelatedEntities<TEntity>(String, Nullable<EntityRole>)

Gets the collection of related entity instances for the specified relationship.

GetRelatedEntity<TEntity>(String, Nullable<EntityRole>) GetRelatedEntity<TEntity>(String, Nullable<EntityRole>) GetRelatedEntity<TEntity>(String, Nullable<EntityRole>) GetRelatedEntity<TEntity>(String, Nullable<EntityRole>)

Gets the related entity instance for the specified relationship.

SetAttributeValue(String, Object) SetAttributeValue(String, Object) SetAttributeValue(String, Object) SetAttributeValue(String, Object)

Sets the value of an attribute.

SetRelatedEntities<TEntity>(String, Nullable<EntityRole>, IEnumerable<TEntity>) SetRelatedEntities<TEntity>(String, Nullable<EntityRole>, IEnumerable<TEntity>) SetRelatedEntities<TEntity>(String, Nullable<EntityRole>, IEnumerable<TEntity>) SetRelatedEntities<TEntity>(String, Nullable<EntityRole>, IEnumerable<TEntity>)

Sets the collection of related entity instances for the specified relationship.

SetRelatedEntity<TEntity>(String, Nullable<EntityRole>, TEntity) SetRelatedEntity<TEntity>(String, Nullable<EntityRole>, TEntity) SetRelatedEntity<TEntity>(String, Nullable<EntityRole>, TEntity) SetRelatedEntity<TEntity>(String, Nullable<EntityRole>, TEntity)

Sets the related entity instance for the specified relationship.

ToEntity<T>() ToEntity<T>() ToEntity<T>() ToEntity<T>()

Gets the entity as the specified type.

ToEntityReference() ToEntityReference() ToEntityReference() ToEntityReference()

Gets an entity reference for this entity instance.

Applies to