在C#.NET Core-Nuget包WindowsAzure.Storage中使用Azure表存储 我正在编写一个新的应用程序来存储Azure中表存储的日志。
这是我的存储对象的外观:在C#.NET Core-Nuget包WindowsAzure.Storage中使用Azure表存储 我正在编写一个新的应用程序来存储Azure中表存储的日志。,c#,.net-core,nuget-package,azure-table-storage,C#,.net Core,Nuget Package,Azure Table Storage,这是我的存储对象的外观: public class ErrorLog : TableEntity { public static ErrorLog Create(DateTime dateTime, int httpStatusCode, string message) => new ErrorLog { PartitionKey = GetPartitionKey(dateTime), RowKey
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");
}
但是,我试图找到新的NuGet软件包来代替“WindowsAzure.Storage”(已弃用),但没有用。As已弃用。软件包处于维护模式,不久将被弃用。您应该使用library,它还可以用于访问Azure存储表。Microsoft.Azure.Cosmos.Table是一个用于Azure表的新软件包
WindowsAzure.Storage
有什么问题?该软件包已被弃用。Microsoft.Azure.Cosmos.Table是用于Azure表的新软件包。您可以在@SergeyVishnevsky上找到您应该使用的内容,您要使用的注释是正确的。你能把这个作为答案贴出来吗。