Using DateTime?.Value.TimeOfDay in LINQ Query

后端 未结 1 1059
庸人自扰
庸人自扰 2020-12-20 17:12

I\'m trying to do a Query with LINQ on ASP.NET MVC 3.

I have a model, lets call it Event. This Event object has a Date property, of DateTime?. What I want is to fetc

相关标签:
1条回答
  • 2020-12-20 17:25

    Use the Date and Time Canonical Functions for LINQ-to-Entities. Specifically, look at

    CreateTime(hour, minute, second)
    

    If you need help calling a canonical function, look at How To: Call Canonical Functions.

    0 讨论(0)
提交回复
热议问题