Given the timezone offset value as a nullable int how would I go about converting that inside the linq query to the current time of the location?
var data = (from c in dbContext.Contacts
select new
{
c.Id,
TheirTime = DateTime.UtcNow.AddHours(c.TimezoneOffset)
})
This returns a "LINQ to Entities does not recognize the method 'System.DateTime AddHours(Double)' method, and this method cannot be translated into a store expression." error.