ASP .NET Core 和 Azure Table 存储

ASP .NET Core and Azure Table Storage

我是 ASP.NET Core 的新手,我们必须实现一个应用程序来存储一些非关系数据(Excel- 中的一些行喜欢 table),所以我们决定使用 Azure 表。据我了解 EntityFramework Core 不支持 AzureTables... 在这种情况下正确的方法是什么?

Entity Framework 是数据库的 ER 映射器。 Azure Table 存储是一种 NoSQL 类型的解决方案。请在此处找到有关使用可用 NuGet 包的更多信息:

Windows Azure Storage

另一个很棒的资源是 Get started with Azure Table storage using .NET,它将为您提供开始使用 Table 存储所需的所有信息。

由于您使用的是 ASP.NET Core,因此您不应从 web.config 中读取设置,而应从 appsettings.json 中读取设置。 CloudStorageAccount 有一个静态的 .Parse method,它将解析 ConnectionString 并为您创建一个 CloudStorageAccount 实例。在这里查看如何从 ASP.NET Core 中的 appsettings.json 读取设置:Configuration in ASP.NET Core | Microsoft Docs.