There is no type (class) that will be a WADLogs object. Using the base class, you will only get the PartionKey, RowKey, and Timestamp properties. You must determine this yourself. Here's the sample I'm using:
public class WadLogEntity : Microsoft.WindowsAzure.StorageClient.TableServiceEntity { public WadLogEntity() { PartitionKey = "a"; RowKey = string.Format("{0:10}_{1}", DateTime.MaxValue.Ticks - DateTime.Now.Ticks, Guid.NewGuid()); } public string Role { get; set; } public string RoleInstance { get; set; } public int Level { get; set; } public string Message { get; set; } public int Pid { get; set; } public int Tid { get; set; } public int EventId { get; set; } public DateTime EventDateTime { get { return new DateTime(long.Parse(this.PartitionKey.Substring(1))); } } }
Also, when I was struggling with the WADLogs table, I was able to show the results (in the last 24 hours) using this code:
var dtThen = DateTime.UtcNow.AddHours(-24); var dtNow = DateTime.UtcNow; var logs = this._wadLogs.WadLogs.Where( wl => wl.Level == 2 && String.Compare(wl.PartitionKey,"0" + dtThen.Ticks.ToString()) >=0 && String.Compare(wl.PartitionKey, "0" + dtNow.Ticks.ToString()) < 0 ).Take(200);
I noticed that before the key there is a prefix "0" in the section key.
source share