dtretyakov/WindowsAzure

Cannot Query on Timestamp

Opened this issue · 0 comments

I have the following Entity:

public class IotHubMessageEntity 
    {
        [PartitionKey]
        public string DeviceId { get; set; }
        [RowKey]
        public string RowKey { get; set; }
        [Timestamp]
        public DateTime Time { get; set; }
        ........
        ........
    }

When I query like this I get the expected result:

  var entities =iotHubMessageRepository.Where(z => z.DeviceId == deviceId);

But this returns an empty result:

 var entities = iotHubMessageRepository.Where(
                         z => z.DeviceId == deviceId
                         && z.Time >= start
                         && z.Time <=end
                         );

Any Ideas?