DbContextConfiguration.AutoDetectChangesEnabled 屬性

[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]

取得或設定值,指出 DbContext 和相關類別的方法是否會自動呼叫 DetectChanges() 方法。 預設值為 true。

命名空間:  System.Data.Entity.Infrastructure
組件:  EntityFramework (在 EntityFramework.dll 中)

語法

'宣告
Public Property AutoDetectChangesEnabled As Boolean 
    Get 
    Set
'用途
Dim instance As DbContextConfiguration 
Dim value As Boolean 

value = instance.AutoDetectChangesEnabled

instance.AutoDetectChangesEnabled = value
public bool AutoDetectChangesEnabled { get; set; }
public:
property bool AutoDetectChangesEnabled {
    bool get ();
    void set (bool value);
}
member AutoDetectChangesEnabled : bool with get, set
function get AutoDetectChangesEnabled () : boolean 
function set AutoDetectChangesEnabled (value : boolean)

屬性值

類型:System.Boolean
如果應該自動呼叫,則為 true;否則為 false。

請參閱

參考

DbContextConfiguration 類別

System.Data.Entity.Infrastructure 命名空間