共用方式為


EntityState 列舉

Indicates the state of an entity as tracked by the OrganizationServiceContext and indicates to the server the operation that should be performed for a related entity.

命名空間: Microsoft.Xrm.Sdk
組件: Microsoft.Xrm.Sdk (在 Microsoft.Xrm.Sdk.dll 中)

語法

'宣告
<DataContractAttribute(Name:="EntityState", Namespace:="https://schemas.microsoft.com/xrm/2011/Contracts")> _
Public Enumeration EntityState
[DataContractAttribute(Name="EntityState", Namespace="https://schemas.microsoft.com/xrm/2011/Contracts")] 
public enum EntityState

成員

成員名稱 描述
Changed The entity was changed since the last call to SaveChanges. Value = 2.
Created The entity was created since the last call to SaveChanges. Value = 1.
Unchanged The entity is unchanged since the last call to SaveChanges. Value = 0.

備註

The OrganizationServiceContext sets this value after the SaveChanges method is called and uses this value to track changes to entities. You can also set this value to Changed for a related entity to indicate to the service context that the related entity has been changed and that those changes need to be passed to the server. The service context sends changes to the server when the SaveChanges method is called.

平台

Development Platforms

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Target Platforms

Windows Server 2008、Windows Server 2012、Windows 7

請參閱

參照

Microsoft.Xrm.Sdk 命名空間

Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.