Jörg: LINQ

Beitrag lesen

Moin Casa,

in der Doku (EntityFunctions.TruncateTime Method) steht:

⇒ You cannot call this function directly. This function can only appear within a LINQ to Entities query.
⇒ This function is translated to a corresponding function in the database.

An dieser Stelle sind wir aber schon ausserhalb von Linq to Entities.

Anstatt

  
MyDate = (DateTime)EntityFunctions.TruncateTime(gr.Date)  

sollte folgendes helfen

  
MyDate = gr.Date.Date  

hth