Dela via


CrmEntity Class

 

Applies To: Dynamics CRM 2015

Extensions to the core Microsoft.Xrm.Sdk.Entity class. (Developer Extensions)

Namespace:   Microsoft.Xrm.Client
Assembly:  Microsoft.Xrm.Client (in Microsoft.Xrm.Client.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Xrm.Sdk.Entity
    Microsoft.Xrm.Client.CrmEntity

Syntax

[IgnorePropertiesAttribute(new string[] { ... })]
[DataContractAttribute(Namespace = "https://schemas.microsoft.com/xrm/2011/Contracts")]
[DataServiceKeyAttribute("Id")]
public class CrmEntity : Entity, INotifyPropertyChanging, INotifyPropertyChanged
[IgnorePropertiesAttribute(new array<String^>^ { ... })]
[DataContractAttribute(Namespace = "https://schemas.microsoft.com/xrm/2011/Contracts")]
[DataServiceKeyAttribute("Id")]
public ref class CrmEntity : Entity, INotifyPropertyChanging, 
    INotifyPropertyChanged
[<IgnorePropertiesAttribute([| ... |])>]
[<DataContractAttribute(Namespace = "https://schemas.microsoft.com/xrm/2011/Contracts")>]
[<DataServiceKeyAttribute("Id")>]
type CrmEntity = 
    class
        inherit Entity
        interface INotifyPropertyChanging
        interface INotifyPropertyChanged
    end
<IgnorePropertiesAttribute(New String() { ... })>
<DataContractAttribute(Namespace := "https://schemas.microsoft.com/xrm/2011/Contracts")>
<DataServiceKeyAttribute("Id")>
Public Class CrmEntity
    Inherits Entity
    Implements INotifyPropertyChanging, INotifyPropertyChanged

Constructors

Name Description
System_CAPS_pubmethod CrmEntity(String)

Initializes a new instance of the CrmEntity class.

Properties

Name Description
System_CAPS_pubproperty Attributes

(Inherited from Entity.)

System_CAPS_pubproperty EntityState

(Inherited from Entity.)

System_CAPS_pubproperty ExtensionData

(Inherited from Entity.)

System_CAPS_pubproperty FormattedValues

(Inherited from Entity.)

System_CAPS_pubproperty Id

(Inherited from Entity.)

System_CAPS_pubproperty Item[String]

(Inherited from Entity.)

System_CAPS_pubproperty LogicalName

(Inherited from Entity.)

System_CAPS_pubproperty RelatedEntities

(Inherited from Entity.)

Methods

Name Description
System_CAPS_pubmethod Contains(String)

(Inherited from Entity.)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetAttributeCollectionValue<T>(String)

Retrieves the value of a sequence attribute.

System_CAPS_pubmethod GetAttributeValue<T>(String)

Retrieves the value of an attribute.(Overrides Entity.GetAttributeValue<T>(String).)

System_CAPS_protmethod GetFormattedAttributeValue(String)

(Inherited from Entity.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

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

Gets the collection of related entity instances for the specified relationship.(Overrides Entity.GetRelatedEntities<TEntity>(String, Nullable<EntityRole>).)

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

Gets the related entity instance for the specified relationship.(Overrides Entity.GetRelatedEntity<TEntity>(String, Nullable<EntityRole>).)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod SetAttributeCollectionValue<T>(String, String, IEnumerable<T>)

Modifies the value of a sequence attribute.

System_CAPS_protmethod SetAttributeValue(String, Object)

(Inherited from Entity.)

System_CAPS_protmethod SetAttributeValue<T>(String, String, Object)

Modifies the value of an attribute.

System_CAPS_protmethod SetAttributeValue<T>(String, String, String, Object)

Modifies the value of an attribute.

System_CAPS_protmethod SetPrimaryIdAttributeValue<T>(String, String, Object)

Modifies the value of a primary key attribute.

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

(Inherited from Entity.)

System_CAPS_protmethod SetRelatedEntities<TEntity>(String, String, IEnumerable<TEntity>)

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

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

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

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

(Inherited from Entity.)

System_CAPS_protmethod SetRelatedEntity<TEntity>(String, String, TEntity)

Sets the related entity for a specific relationship.

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

Sets the related entity for a specific relationship.

System_CAPS_pubmethod ToEntity<T>()

(Inherited from Entity.)

System_CAPS_pubmethod ToEntityReference()

(Inherited from Entity.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Events

Name Description
System_CAPS_pubevent PropertyChanged

Occurs when an attribute or relationship is set.

System_CAPS_pubevent PropertyChanging

Occurs when an attribute or relationship is set.

Extension Methods

Name Description
System_CAPS_pubmethod AssertEntityName(String[])

Verifies that the logical name of an entity is the expected name.(Defined by EntityExtensions.)

System_CAPS_pubmethod Clone(Boolean)

Overloaded. Deep clones an instance of the Entity class.(Defined by EntityExtensions.)

System_CAPS_pubmethod GetAttributeValue(String)

Overloaded. Retrieves the value of the attribute.(Defined by EntityExtensions.)

System_CAPS_pubmethod GetEntityReferenceValue<T>(String)

Retrieves attribute values for EntityReference attributes.(Defined by EntityExtensions.)

System_CAPS_pubmethod GetRelatedEntities(OrganizationServiceContext, Relationship)

Overloaded. Retrieves the collection of related entities for a specific relationship.(Defined by EntityExtensions.)

System_CAPS_pubmethod GetRelatedEntities(OrganizationServiceContext, String, Nullable<EntityRole>)

Overloaded. Retrieves the collection of related entities for a specific relationship.(Defined by EntityExtensions.)

System_CAPS_pubmethod GetRelatedEntities<TEntity>(Relationship)

Overloaded. Retrieves the collection of related entities for a specific relationship.(Defined by EntityExtensions.)

System_CAPS_pubmethod GetRelatedEntities<TEntity, TResult>(Expression<Func<TEntity, IEnumerable<TResult>>>)

Overloaded. Retrieves the collection of related entities for a specific relationship.(Defined by EntityExtensions.)

System_CAPS_pubmethod GetRelatedEntity(OrganizationServiceContext, Relationship)

Overloaded. Retrieves the related entity for a specific relationship.(Defined by EntityExtensions.)

System_CAPS_pubmethod GetRelatedEntity(OrganizationServiceContext, String, Nullable<EntityRole>)

Overloaded. Retrieves the related entity for a specific relationship.(Defined by EntityExtensions.)

System_CAPS_pubmethod GetRelatedEntity<TEntity>(Relationship)

Overloaded. Retrieves the related entity for a specific relationship.(Defined by EntityExtensions.)

System_CAPS_pubmethod SerializeByJson(IEnumerable<Type>)

Serialize an object using the DataContractJsonSerializer.(Defined by ObjectExtensions.)

System_CAPS_pubmethod SetAttributeCollectionValue<T>(String, IEnumerable<T>)

Modifies the value of a sequence attribute.(Defined by EntityExtensions.)

System_CAPS_pubmethod SetAttributeValue(String, String, Object)

Overloaded. Modifies the value of an attribute.(Defined by EntityExtensions.)

System_CAPS_pubmethod SetAttributeValue<T>(String, Object)

Overloaded. Modifies the value of an attribute.(Defined by EntityExtensions.)

System_CAPS_pubmethod SetRelatedEntities<TEntity>(Relationship, IEnumerable<TEntity>)

Overloaded. Modifies the collection of related entities for a specific relationship.(Defined by EntityExtensions.)

System_CAPS_pubmethod SetRelatedEntities<TEntity>(String, IEnumerable<TEntity>)

Overloaded. Modifies the collection of related entities for a specific relationship.(Defined by EntityExtensions.)

System_CAPS_pubmethod SetRelatedEntity<TEntity>(Relationship, TEntity)

Overloaded. Modifies a related entity for a specific relationship.(Defined by EntityExtensions.)

System_CAPS_pubmethod SetRelatedEntity<TEntity>(String, TEntity)

Overloaded. Modifies a related entity for a specific relationship.(Defined by EntityExtensions.)

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Entity
Microsoft.Xrm.Client Namespace
Developer extensions for Microsoft Dynamics CRM 2015

Return to top

© 2017 Microsoft. All rights reserved. Copyright