DbFunctions.Truncate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Truncate(Nullable<Decimal>, Nullable<Int32>) |
When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to truncate the given value to the number of specified digits. |
Truncate(Nullable<Double>, Nullable<Int32>) |
When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to truncate the given value to the number of specified digits. |
Truncate(Nullable<Decimal>, Nullable<Int32>)
When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to truncate the given value to the number of specified digits.
[System.Data.Entity.DbFunction("Edm", "Truncate")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="digits")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="value")]
public static Nullable<decimal> Truncate (Nullable<decimal> value, Nullable<int> digits);
static member Truncate : Nullable<decimal> * Nullable<int> -> Nullable<decimal>
Public Shared Function Truncate (value As Nullable(Of Decimal), digits As Nullable(Of Integer)) As Nullable(Of Decimal)
Parameters
Returns
The truncated value.
- Attributes
Remarks
You cannot call this function directly. This function can only appear within a LINQ to Entities query. This function is translated to a corresponding function in the database.
Applies to
Truncate(Nullable<Double>, Nullable<Int32>)
When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to truncate the given value to the number of specified digits.
[System.Data.Entity.DbFunction("Edm", "Truncate")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="value")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="digits")]
public static Nullable<double> Truncate (Nullable<double> value, Nullable<int> digits);
static member Truncate : Nullable<double> * Nullable<int> -> Nullable<double>
Public Shared Function Truncate (value As Nullable(Of Double), digits As Nullable(Of Integer)) As Nullable(Of Double)
Parameters
Returns
The truncated value.
- Attributes
Remarks
You cannot call this function directly. This function can only appear within a LINQ to Entities query. This function is translated to a corresponding function in the database.
Applies to
Entity Framework