SqlServerDbFunctionsExtensions.TimeFromParts Method

Definition

Initializes a new instance of the TimeSpan structure to the specified hour, minute, second, fractions, and precision. Corresponds to SQL Server's TIMEFROMPARTS(hour, minute, seconds, fractions, precision).

public static TimeSpan TimeFromParts (this Microsoft.EntityFrameworkCore.DbFunctions _, int hour, int minute, int second, int fractions, int precision);
static member TimeFromParts : Microsoft.EntityFrameworkCore.DbFunctions * int * int * int * int * int -> TimeSpan
<Extension()>
Public Function TimeFromParts (_ As DbFunctions, hour As Integer, minute As Integer, second As Integer, fractions As Integer, precision As Integer) As TimeSpan

Parameters

_
DbFunctions

The DbFunctions instance.

hour
Int32

The hours (0 through 23).

minute
Int32

The minutes (0 through 59).

second
Int32

The seconds (0 through 59).

fractions
Int32

The fractional seconds (0 through 9999999).

precision
Int32

The precision of the time value (0 through 7).

Returns

New instance of the TimeSpan structure to the specified hour, minute, second, fractions, and precision.

Remarks

See Database functions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to