EdmFunctions.Truncate(DbExpression, DbExpression) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立會使用指定引數叫用標準 'Truncate' 函式的 DbFunctionExpression,其中的引數必須具有單精度浮點數、雙精度浮點數或十進位,以及整數結果型別。 運算式的結果類型與實值的結果類型相同。
public static System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression Truncate(this System.Data.Entity.Core.Common.CommandTrees.DbExpression value, System.Data.Entity.Core.Common.CommandTrees.DbExpression digits);
static member Truncate : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Common.CommandTrees.DbExpression -> System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function Truncate (value As DbExpression, digits As DbExpression) As DbFunctionExpression
參數
- value
- DbExpression
運算式,指定要截斷的數值。
- digits
- DbExpression
運算式,指定截斷時要使用的精確位數。
傳回
新的 DbFunctionExpression,會將指定的引數截斷為最接近的整數值,有效位數如數位所指定。