I'm in the middle of writing a new app to store logs in Table Storage in Azure.
This is how my storage object looks:
public class ErrorLog : TableEntity{ public static ErrorLog Create(DateTime dateTime, int httpStatusCode, string message) => new ErrorLog { PartitionKey = GetPartitionKey(dateTime), RowKey = GetRowKey(dateTime), HttpStatusCode = httpStatusCode, Message = message, }; public int HttpStatusCode { get; set; } public string Message { get; set; } public static string GetPartitionKey(DateTime dateTime) => dateTime.ToString("yyyy_MM_dd_HH"); public static string GetRowKey(DateTime dateTime) => dateTime.ToString("mm_ss");}
However, I'm trying to find the new NuGet package to use instead of "WindowsAzure.Storage" (which has been deprecated), to no avail.