SqlServerDbFunctionsExtensions.DateFromParts 方法

定義

將 結構的新實例 DateTime 初始化為指定的年份、月、日。 對應至SQL Server 的 DATEFROMPARTS(year, month, day)

public static DateTime DateFromParts (this Microsoft.EntityFrameworkCore.DbFunctions _, int year, int month, int day);
static member DateFromParts : Microsoft.EntityFrameworkCore.DbFunctions * int * int * int -> DateTime
<Extension()>
Public Function DateFromParts (_ As DbFunctions, year As Integer, month As Integer, day As Integer) As DateTime

參數

_
DbFunctions

DbFunctions 執行個體。

year
Int32

年 (1753 到 9999) 。

month
Int32

月份 (1 到 12)。

day
Int32

日 (1 到 month 中的天數)。

傳回

結構的新實例 DateTime 到指定的年份、月、日。

備註

如需詳細資訊和範例,請參閱使用EF Core 存取SQL Server和Azure SQL資料庫

適用於