Hi all
I need to translate a field from UTC to local time in a LINQ to Entities query. But it does not recognize the method 'System.DateTime ToLocalTime' that I was intended to use.
My query was that way:
Select requests for which doesn't exist any other request in the same day in local not yet resolved. Having into account that IncommingDateTime is stored in UTC, this is the query.
from r in Requests
where Request.Count(x => x.IncommingDateTime.ToLocalTime().Date == r.IncommingDateTime.ToLocalTime().Date
&& x.Resolved == false ) = 0
select r
I'll appreciate any help.