Using DateTime in Dynamic LINQ to Entities

前端 未结 4 998
醉梦人生
醉梦人生 2021-01-05 09:34

I am using LINQ to Entities to retrieve item purchase dates as follows:

where EntityFunctions.TruncateTime(order.PurchaseDate) == myPurchaseDate.date
         


        
4条回答
  •  攒了一身酷
    2021-01-05 09:40

    Here is a link that lists EF4 functions that map to sql functions

    Conceptual Model Canonical to SQL Server Functions Mapping

提交回复
热议问题