'TimeOfDay' is not supported in LINQ to Entities - Find total seconds in Linq 2 SQL

后端 未结 3 1886
-上瘾入骨i
-上瘾入骨i 2020-12-21 17:10

When I do the following :

[EdmFunction(\"Edm\", \"TruncateTime\")]
public static DateTime? TruncateDateTime(DateTime? inputDate)
{
    return inputDate.HasV         


        
3条回答
  •  鱼传尺愫
    2020-12-21 17:58

    Have a look at Date and Time Canonical Functions for LINQ-to-Entities and if you are unsure on how to call them, have a look at How to: Call Canonical Functions

    The methods that are available should be able to solve the problem your currently having where the operations your currently using are not supported by the database.

提交回复
热议问题