SqlServerDbFunctionsExtensions.TimeFromParts 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化結構的新實例 TimeSpan ,設定為指定的時、分、秒、分數及精度。 對應於 SQL Server 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
參數
DbFunctions 執行個體。
- hour
- Int32
小時 (0 到 23) 。
- minute
- Int32
分鐘 (0 到 59) 。
- second
- Int32
秒(0 到 59)。
- fractions
- Int32
分秒(0到9999999)。
- precision
- Int32
時間值的精確度(0 到 7)。
傳回
結構的新實例 TimeSpan ,針對指定的時、分鐘、秒、分數和精度。
備註
更多資訊與範例請參閱「資料庫函數」及「使用 EF Core 存取 SQL Server 與 Azure SQL 資料庫」。