Sdílet prostřednictvím


EdmFunctions.DiffHours(DbExpression, DbExpression) Metoda

Definice

Vytvoří objekt DbFunctionExpression , který vyvolá kanonickou funkci DiffHours se zadanými argumenty, které musí mít typ výsledku DateTime, DateTimeOffset nebo Time. Typ výsledku výrazu je Edm.Int32.

public static System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression DiffHours (this System.Data.Entity.Core.Common.CommandTrees.DbExpression timeValue1, System.Data.Entity.Core.Common.CommandTrees.DbExpression timeValue2);
static member DiffHours : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Common.CommandTrees.DbExpression -> System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function DiffHours (timeValue1 As DbExpression, timeValue2 As DbExpression) As DbFunctionExpression

Parametry

timeValue1
DbExpression

Výraz, který určuje argument hodnoty prvního času.

timeValue2
DbExpression

Výraz, který určuje argument hodnoty druhého času.

Návraty

Nový DbFunctionExpression, který vrátí počet hodin, který je rozdíl mezi timeValue1 a timeValue2.

Platí pro