DbContextConfiguration.UseDatabaseNullSemantics 屬性
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
取得或設定值,此值表示是否要在比較兩個可能為 null 的運算元時顯示資料庫 null 語意。 預設值為 false。 例如 (operand1 == operand2) 會分別轉譯為:(operand1 = operand2) (當 UseDatabaseNullSemantics 為 true 時;(((operand1 = operand2) AND (NOT (operand1 IS NULL OR operand2 IS NULL))) OR ((operand1 IS NULL) AND (operand2 IS NULL))) (當 UseDatabaseNullSemantics 為 false 時)。
命名空間: System.Data.Entity.Infrastructure
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Public Property UseDatabaseNullSemantics As Boolean
Get
Set
'用途
Dim instance As DbContextConfiguration
Dim value As Boolean
value = instance.UseDatabaseNullSemantics
instance.UseDatabaseNullSemantics = value
public bool UseDatabaseNullSemantics { get; set; }
public:
property bool UseDatabaseNullSemantics {
bool get ();
void set (bool value);
}
member UseDatabaseNullSemantics : bool with get, set
function get UseDatabaseNullSemantics () : boolean
function set UseDatabaseNullSemantics (value : boolean)
屬性值
類型:System.Boolean
如果已啟用資料庫 null 比較行為,則為 true,否則為 false。