DbExpressionBuilder.Null 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
建立新的 DbNullExpression,此運算式表示具類型的 null 值。
命名空間: System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<ExtensionAttribute> _
Public Shared Function Null ( _
nullType As TypeUsage _
) As DbNullExpression
'用途
Dim nullType As TypeUsage
Dim returnValue As DbNullExpression
returnValue = nullType.Null()
public static DbNullExpression Null(
this TypeUsage nullType
)
[ExtensionAttribute]
public:
static DbNullExpression^ Null(
TypeUsage^ nullType
)
static member Null :
nullType:TypeUsage -> DbNullExpression
public static function Null(
nullType : TypeUsage
) : DbNullExpression
參數
- nullType
類型:System.Data.Entity.Core.Metadata.Edm.TypeUsage
null 值的類型。
傳回值
類型:System.Data.Entity.Core.Common.CommandTrees.DbNullExpression
DbNullExpression 的執行個體。
使用注意事項
在 Visual Basic 和 C# 中,您可以在任何 TypeUsage 類型物件中呼叫這個方法以做為執行個體。使用執行個體方法語法呼叫這個方法時,請省略第一個參數。如需詳細資訊,請參閱 https://msdn.microsoft.com/zh-tw/library/bb384936(v=vs.113)或 https://msdn.microsoft.com/zh-tw/library/bb383977(v=vs.113)。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | nullType 為 null。 |
請參閱
參考
System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder 命名空間