EntityObject.EntityState 属性

定义

获取对象的实体状态。Gets the entity state of the object.

public:
 property System::Data::EntityState EntityState { System::Data::EntityState get(); };
[System.ComponentModel.Browsable(false)]
public System.Data.EntityState EntityState { get; }
[<System.ComponentModel.Browsable(false)>]
member this.EntityState : System.Data.EntityState
Public ReadOnly Property EntityState As EntityState

属性值

EntityState

此对象的 EntityStateThe EntityState of this object.

属性

注解

当对象作为查询的结果或通过调用 Attach 附加到对象上下文时,EntityState 将变为 UnchangedWhen an object is attached to the object context, either as the result of a query or by calling Attach, the EntityState becomes Unchanged.

当对象从对象上下文分离时,它返回到 Detached 状态。When an object is detached from the object context, it returns to the Detached state.

适用于