dtretyakov / WindowsAzure

.NET library aimed at managing and querying entities from Windows Azure Storage. It can be used as LINQ to Azure Tables.
MIT License
64 stars 27 forks source link

Cannot Query on Timestamp #59

Open KapteinBabbalas opened 7 years ago

KapteinBabbalas commented 7 years ago

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?