'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported

后端 未结 8 547
粉色の甜心
粉色の甜心 2020-11-27 05:57

I am trying to execute the following code and am receiving an error

public List GetLoggingData(DateTime LogDate, string title)
{
     var context          


        
8条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-27 06:10

    EntityFunctions.TruncateTime(t.Timestamp) is obsolete from EF6.

    Use below

    DbFunctions.TruncateTime(t.Timestamp)

提交回复
热议问题