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

后端 未结 3 1880
-上瘾入骨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:55

    If you have a Linq-To-Entities Query you can only perform operations which can be executed by your used database management system.

    You will need to get your desired information from your DB and create a list from that query, than that will be called Linq-To-Objects and you will be able to perform you desired operation.

提交回复
热议问题